/ Published in: Python

The script was modified slightly based on comments.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
import os from Foundation import NSMutableDictionary version = os.popen4("git rev-parse --short HEAD")[1].read() info = os.environ['INFOPLIST_PATH'] plist = NSMutableDictionary.dictionaryWithContentsOfFile_(info) plist['CFBundleVersion'] = version plist.writeToFile_atomically_(info, 1)
URL: http://www.cimgf.com/2008/04/13/git-and-xcode-a-git-build-number-script/
Comments
