Skip to content

Instantly share code, notes, and snippets.

@levi
Created February 26, 2010 11:25
Show Gist options
  • Save levi/315648 to your computer and use it in GitHub Desktop.
Save levi/315648 to your computer and use it in GitHub Desktop.
Name sc-build number with git's HEAD
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