Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a release script #10

Open
guidomb opened this issue Sep 17, 2015 · 5 comments
Open

Add a release script #10

guidomb opened this issue Sep 17, 2015 · 5 comments

Comments

@guidomb
Copy link
Owner

guidomb commented Sep 17, 2015

It should create a bump the project's version and create a tag. If using carthage generate the zip files and upload them to a GitHub release draft. For cocoapods upload it to trunk.

@guidomb
Copy link
Owner Author

guidomb commented Sep 24, 2015

It should something like this

#!/bin/bash

set -e

# Check that working directory is clean
git checkout master
script/test
agvtool new-marketing-version $1
git commit -m "Bumps version to $1"
git tag $1
git push origin HEAD --no-verify
git push origin --tags
# 1. open text editor (configurable from env variable)
# to write release title and description (markdown)
#
# 2. create GitHub release with tag $1 using
# title and description from previous step.
#
# 3. carthage build --no-skip-current
#
# 4. carthage archive $PROJECT_NAME
#
# 5. upload .framework.zip to release
#
# 6. delete .framework.zip
mkdir -p "/tmp/$PROJECT_NAME/releases/$1"
(cd "/tmp/$PROJECT_NAME/releases/$1" && echo 'github "$PROJECT_REPO ~> $1"' > Cartfile && carthage update --no-use-binaries && rm -frd Carthage && carthage update) 

@hzalaz
Copy link
Contributor

hzalaz commented Sep 24, 2015

@guidomb I'd rather split this in three commands:

  • bump version
  • tag version in git (and push to remote)
  • release action (push to CP trunk or upload binaries)

Like this lib https://github.com/svenfuchs/gem-release

Most of the time I'd bump and tag, and try to test it (manually or in a CI) then if I am fine with it, I'll release it to the wild, if not I just remove the tag and start over (I can even rewrite history).

@guidomb
Copy link
Owner Author

guidomb commented Sep 24, 2015

Makes senses. I think it could be splitted in 3 commands but in a different way

release

  • bump version
  • commit
  • generate tag
  • build
  • generate archive

publish release

  • Generate release title and description
  • push commit and tag
  • create github release
  • upload precompiled
  • upload to trunk CP
  • delete archive

test release

  • test that carthage release is accesible
  • test that cp release is accessible

@hzalaz
Copy link
Contributor

hzalaz commented Sep 24, 2015

👍

@guidomb
Copy link
Owner Author

guidomb commented Jan 11, 2016

We should check out this section of the docs that talks about generating the .framework from Travis https://github.com/Carthage/Carthage#use-travis-ci-to-upload-your-tagged-prebuild-frameworks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants