Created
April 9, 2015 01:28
-
-
Save parrots/d37f390d06114a4167c6 to your computer and use it in GitHub Desktop.
Revisions
-
parrots created this gist
Apr 9, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ git=`sh /etc/profile; which git` branch_name=`$git symbolic-ref HEAD | sed -e 's,.*/\\(.*\\),\\1,'` git_count=`$git rev-list $branch_name |wc -l | sed 's/^ *//;s/ *$//'` simple_branch_name=`$git rev-parse --abbrev-ref HEAD` build_number="$git_count" if [ $CONFIGURATION != "Release" ]; then build_number+="-$simple_branch_name" fi plist="${SRCROOT}/WatchKit App/Info.plist" /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $build_number" "$plist"