rcbump is the successor to rchook. It is intended for single-repository projects and has a simpler implementation.
In response to a Product->Archive in Xcode, automatically:
- Verify git working directory is clean
- Bump build number to next even number
- Do a
git commit/git tag - Bump build number to next odd number, do another
git commit
Setting up Xcode is similar to rchook, but no "Build -> Pre-actions" phase is required.
In the "Build Phases" tab for your main target, add a "Run Script Phase" with the following content:
which rcbump
if [ $? -eq 0 ]; then
rcbump build
exit $?
fiIn the "Edit Scheme" window for the project, add an "Archive -> Post-actions" script:
which rcbump && rcbump post
The build and post do not take any arguments. Unlike rchook, rcbump does not handle code-signing, zipping, or uploading.
Public Domain