Created
January 27, 2014 20:08
-
-
Save tkfm-yamaguchi/8656260 to your computer and use it in GitHub Desktop.
Git hash for rake
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 Git | |
def self.current_hash | |
`git rev-parse --short HEAD`.chomp | |
end | |
end | |
task :hash do | |
puts Git.current_hash | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment