ios-scripts icon indicating copy to clipboard operation
ios-scripts copied to clipboard

Add a release script

Open guidomb opened this issue 10 years ago • 5 comments

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 avatar Sep 17 '15 01:09 guidomb

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) 

guidomb avatar Sep 24 '15 03:09 guidomb

@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).

hzalaz avatar Sep 24 '15 13:09 hzalaz

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

guidomb avatar Sep 24 '15 18:09 guidomb

:+1:

hzalaz avatar Sep 24 '15 18:09 hzalaz

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

guidomb avatar Jan 11 '16 13:01 guidomb