Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#!/usr/bin/env macruby
# From:
# Expanded from here:
# Xcode auto-versioning script for Subversion by Axel Andersson
# Updated for git by Marcus S. Zarra and Matt Long
# Converted to ruby by Abizern
# Converted to MacRuby by Gregory Furmanek
# Merged with MacRuby version by elliottcable
# Appends the git sha to the version number set in Xcode.
git = `sh /etc/profile; which git`.chomp
sha = `#{git} rev-parse --short HEAD`.chomp
list = NSMutableDictionary.dictionaryWithContentsOfFile info_file
list['CFBundleVersion'] = sha
list.writeToFile 'Info.plist', :atomically => true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.