Created
October 28, 2011 19:17
-
-
Save jdriscoll/1323205 to your computer and use it in GitHub Desktop.
Xcode build script (Apple generic versioning tool)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
if git diff-index --quiet HEAD --; then | |
agvtool next-version -all | |
agvtool new-marketing-version "$1" | |
buildnum=`agvtool vers -terse` | |
git add . | |
git commit -m "New build: $1 ($buildnum)" | |
if [ "$2" = "--release" ]; then | |
git tag -a "$1" -m "Release $1 ($buildnum)" | |
echo "Release $1 ($buildnum) is ready to build. Be sure to push your tags." | |
else | |
echo "$1 ($buildnum) is ready to build." | |
fi | |
else | |
echo Commit your changes before building. | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment