Created
April 3, 2009 17:05
-
-
Save ryanbriones/89839 to your computer and use it in GitHub Desktop.
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 characters
| #!/usr/bin/env ruby | |
| # | |
| # Update your Cocoa Project build number with git HEAD | |
| require 'osx/foundation' | |
| INFO_PLIST_FILE = "#{Dir.pwd}/Info.plist" | |
| BUILD_NUMBER = (`git show-ref --head --abbrev HEAD | grep -v origin | awk '{print $1}'`).chomp | |
| info_plist = OSX::NSMutableDictionary.dictionaryWithContentsOfFile(INFO_PLIST_FILE) | |
| info_plist.setObject_forKey(BUILD_NUMBER, "CFBundleVersion") | |
| info_plist.writeToFile_atomically(INFO_PLIST_FILE, true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment