2013-02-18 01:34:43 -05:00
|
|
|
desc "stamp the current build with the git hash placed in version.rb"
|
2013-02-25 11:42:20 -05:00
|
|
|
task "build:stamp" => :environment do
|
2013-02-18 01:34:43 -05:00
|
|
|
git_version = `git rev-parse HEAD`.strip
|
|
|
|
File.open(Rails.root.to_s + '/config/version.rb', 'w') do |f|
|
|
|
|
f.write("$git_version = #{git_version.inspect}\n")
|
|
|
|
end
|
|
|
|
puts "Stamped current build with #{git_version}"
|
|
|
|
end
|