Skip to content
This repository
Browse code

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...
commit 5d979de1a95bb6688d13781a7a42e04acdb3b9cb 1 parent e535b45
Matthew Rudy Jacobs authored January 05, 2009 josevalim committed May 16, 2010
2  railties/builtin/rails_info/rails/info.rb
@@ -38,7 +38,7 @@ def edge_rails_revision(info = git_info)
38 38
       def freeze_edge_version
39 39
         if File.exist?(rails_vendor_root)
40 40
           begin
41  
-            Dir[File.join(rails_vendor_root, 'REVISION_*')].first.scan(/_(\d+)$/).first.first
  41
+            File.readlines(File.join(rails_vendor_root,'REVISION')).first.strip
42 42
           rescue
43 43
             Dir[File.join(rails_vendor_root, 'TAG_*')].first.scan(/_(.+)$/).first.first rescue 'unknown'
44 44
           end
5  railties/lib/tasks/framework.rake
@@ -64,7 +64,10 @@ namespace :rails do
64 64
           rm_f goner
65 65
         end
66 66
 
67  
-        touch "rails/REVISION_#{latest_revision}"
  67
+        puts "Frozen to git revision #{latest_revision}"
  68
+        File.open('rails/REVISION', 'w') do |revision|
  69
+          revision.puts latest_revision
  70
+        end
68 71
       end
69 72
 
70 73
       puts 'Updating current scripts, javascripts, and configuration settings'

0 notes on commit 5d979de

Please sign in to comment.
Something went wrong with that request. Please try again.