Created
February 26, 2010 11:25
-
-
Save levi/315648 to your computer and use it in GitHub Desktop.
Name sc-build number with git's HEAD
This file contains 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
module CT | |
module Git | |
def self.sha(repo) | |
result = `cd "#{repo}" && git log -1 --format=%H`.strip | |
return result =~ /^[0-9a-f]{40}$/ ? result : nil | |
end | |
end | |
end | |
config :sproutcore, :build_number => CT::Git::sha('frameworks/sproutcore') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment