In Xcode, I want to set the project bundle version to the git hash, to create a unique link between a revision and a build.
(I have seen several postings about this that
https://gist.github.com/966838 is a short bash script that meets Apple's requirement that CFBundleVersion should be a monotonically increased string.