Steps:
- Check out the branch master
- Update the
MARKETING_VERSION
in Config/version.xcconfig.
- Note: This must not have a leading
v
.
- Commit the change as "Bump version to vX.Y.Z":
- Run:
git add Config/version.xcconfig && git commit -m "Bump version"
- Do a build and commit the updated Config/generated_current_version.xcconfig for Carthage' sake:
- Run:
SRCROOT=$PWD bin/generate-bundle-version.sh git update-index --no-skip-worktree Config/generated_current_version.xcconfig git add Config/generated_current_version.xcconfig && git commit -m 'Update generated version'
- Tag that commit with the new version number:
- Run:
VERS='vX.Y.Z' git tag -a -m "Release $VERS" "$VERS"
- Archive a pre-built framework for the release
- Run:
carthage checkout && carthage build --cache-builds --no-skip-current && carthage archive EnsentaKit
- Push master along with the tag:
- Run:
git push --follow-tags
- Attach the archive to a corresponding GitHub release
- Paste into the description the output of bin/release-info.sh:
- Run:
bin/release-info.sh | pbcopy
There are actually two versions:
- marketing, like v1.2.3
- internal, like 78.186417373
The public, or marketing, version is the one that aligns with the tagged version. That's the one you need to update.
You'll find it defined in the file Config/version.xcconfig.
Update it there. Follow semver.
NOTE: Till we ship a final, certified build, we're anticipating sticking with v0.y.z, which promises no compatibility. You can just bump the minor version for now, so our first few tags will be v0.0.0, v0.1.0, etc.
Don't forget to commit, but don't push!
git commit -um 'Bump version'
(The internal version is autogenerated at build time.
You can convert from its encoded form to a human-readable form by
passing the version number to bin/release-info.sh, e.g.
bin/release-info.sh 166.186417373
.)
Carthage doesn't do a checkout with git info. So we want to leave the existing git info intact during a Carthage build.
Run from the project root:
SRCROOT=$PWD bin/generate-bundle-version.sh
git update-index --no-skip-worktree Config/generated_current_version.xcconfig
git add Config/generated_current_version.xcconfig && git commit -m 'Update generated version'
Create an annotated tag.
env VERS='v0.Y.0' git tag -am "Release $VERS" "$VERS"
Don't push!
(We do this before pushing the tag, in case the archive build fails. At that point, we can fix the issue, force-uupdate the tag, and none's the wiser.)
Build the project for Release using Carthage:
carthage checkout && carthage build --archive
If the build went fine, you're good to go:
git push --follow-tags
Add a prebuilt framework to the release to speed up build times with Carthage:
- Navigate to the release you'd like to add the framework to at https://github.com/X/Y/releases
- Edit the GitHub release and upload the ZIP file that Carthage created.
- Paste in the output of the bin/release-info.sh script.
Carthage will then download this prebuilt framework instead of building from source. Provided you're building for the same Swift version as was used to create the archive, you will save a lot of build time.