mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-20 20:42:44 -05:00
8 lines
331 B
Ruby
8 lines
331 B
Ruby
desc "stamp the current build with the git hash placed in version.rb"
|
|
task "build:stamp" => :environment do
|
|
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
|