Skip to content

Instantly share code, notes, and snippets.

@jdriscoll
Created July 25, 2014 14:10
Show Gist options
  • Save jdriscoll/d9549f14897b05f6bb47 to your computer and use it in GitHub Desktop.
Save jdriscoll/d9549f14897b05f6bb47 to your computer and use it in GitHub Desktop.
AGVTool wrapper for Xcode projects
#!/usr/bin/env sh
if git diff-index --quiet HEAD --; then
agvtool next-version -all
if [ $# -eq 1 ]
then
agvtool new-marketing-version "$1"
fi
buildnum=`agvtool vers -terse`
buildver=`agvtool mvers -terse1`
git add .
git commit -m "New build: $buildver ($buildnum)"
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