Permalink
Browse files

when we run rake rails:freeze:edge update the value of the "REVISION"…

… file rather than creating a new file "REVISION_ce706..." each time [#1694 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent e535b45 commit 5d979de1a95bb6688d13781a7a42e04acdb3b9cb @matthewrudy matthewrudy committed with josevalim Jan 5, 2009
Showing with 5 additions and 2 deletions.
  1. +1 −1 railties/builtin/rails_info/rails/info.rb
  2. +4 −1 railties/lib/tasks/framework.rake
@@ -38,7 +38,7 @@ def edge_rails_revision(info = git_info)
def freeze_edge_version
if File.exist?(rails_vendor_root)
begin
- Dir[File.join(rails_vendor_root, 'REVISION_*')].first.scan(/_(\d+)$/).first.first
+ File.readlines(File.join(rails_vendor_root,'REVISION')).first.strip
rescue
Dir[File.join(rails_vendor_root, 'TAG_*')].first.scan(/_(.+)$/).first.first rescue 'unknown'
end
@@ -64,7 +64,10 @@ namespace :rails do
rm_f goner
end
- touch "rails/REVISION_#{latest_revision}"
+ puts "Frozen to git revision #{latest_revision}"
+ File.open('rails/REVISION', 'w') do |revision|
+ revision.puts latest_revision
+ end
end
puts 'Updating current scripts, javascripts, and configuration settings'

0 comments on commit 5d979de

Please sign in to comment.