A script to easily increment your Xcode project version.
Don't mind the code :) It's not of a very good quality, I have a limited knowledge of Python and just wrote this for fun and personal use.
- Python 3;
- (Optional) git;
excrement is supposed to be used within the same folder where you have your *.xcodeproj file since it depends on parsing project.pbxproj.
See what the current version in *.pbxproj is:
excrement current
Output:
Project version: 1.0
Build: 2
Increment project version:
excrement (major | minor | patch)
Currently excrement only works with project versions that have following format:
<MAJOR>.<MINOR>.<PATCH> e.g. 1.0.3.
major | minor | patch will also increment your build number.
Commit the increment in git:
excrement (major | minor | patch) git
Adding git parameter will stage all files and commit them with message of the following format:
Upgrade to version <PROJECT_VERSION>, build <BUILD_NUMBER>
Add git tag:
excrement (major | minor | patch) git tag
This will also add git tag which equals to <PROJECT_VERSION> to the git commit.
To install, simply download excrement.py and run following commands in terminal:
cp excrement.py excrementchmod a+x excrementmv excrement /usr/local/bin
Done! Enjoy.
For any questions you can contact me at roudique@gmail.com