Skip to content

Instantly share code, notes, and snippets.

@jason2506
Created January 19, 2014 11:50
Show Gist options
  • Save jason2506/8503788 to your computer and use it in GitHub Desktop.
Save jason2506/8503788 to your computer and use it in GitHub Desktop.
git post-commit hook that automatically update the bundle version.
#!/bin/sh
plist_path=`find . -type f -iname *.plist -d 2`
build=`git rev-parse --short HEAD`
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $build" $plist_path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment