Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added TAG option for rake rails:freeze:edge, so you can say rake rail…

…s:freeze:edge TAG=rel_1-1-0 to lock to the 1.1.0 release [DHH]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4133 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 802493ca6d73c5e4fed5a0a47c181dd28d0c475d 1 parent 484e1c6
@dhh dhh authored
View
2  railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Added TAG option for rake rails:freeze:edge, so you can say rake rails:freeze:edge TAG=rel_1-1-0 to lock to the 1.1.0 release [DHH]
+
* Applied Prototype $() performance patches (#4465, #4477) and updated script.aculo.us [Sam Stephenson, Thomas Fuchs]
* Use --simple-prompt instead of --prompt-mode simple for console compatibility with Windows/Ruby 1.8.2 #4532 [starr@starrnhorne.com]
View
6 railties/builtin/rails_info/rails/info.rb
@@ -33,7 +33,11 @@ def edge_rails_revision(info = svn_info)
def freeze_edge_version
if File.exists?(rails_vendor_root)
- Dir[File.join(rails_vendor_root, 'REVISION_*')].first.scan(/_(\d+)$/).first.first rescue 'unknown'
+ begin
+ Dir[File.join(rails_vendor_root, 'REVISION_*')].first.scan(/_(\d+)$/).first.first
+ rescue
+ Dir[File.join(rails_vendor_root, 'TAG_*')].first.scan(/_(\w+)$/).first.first rescue 'unknown'
+ end
end
end
View
25 railties/lib/tasks/framework.rake
@@ -32,7 +32,7 @@ namespace :rails do
end
end
- desc "Lock this application to latest Edge Rails. Lock a specific revision with REVISION=X"
+ desc "Lock to latest Edge Rails or a specific revision with REVISION=X (ex: REVISION=4021) or a tag with TAG=Y (ex: TAG=rel_1-1-0)"
task :edge do
$verbose = false
`svn --version` rescue nil
@@ -41,20 +41,25 @@ namespace :rails do
exit 1
end
- rails_svn = 'http://dev.rubyonrails.org/svn/rails/trunk'
-
- if ENV['REVISION'].nil?
- ENV['REVISION'] = /^r(\d+)/.match(%x{svn log -q --limit 1 #{rails_svn}})[1]
- puts "REVISION not set. Using HEAD, which is revision #{ENV['REVISION']}."
- end
-
rm_rf "vendor/rails"
mkdir_p "vendor/rails"
- touch "vendor/rails/REVISION_#{ENV['REVISION']}"
+ if ENV['TAG']
+ rails_svn = "http://dev.rubyonrails.org/svn/rails/tags/#{ENV['TAG']}"
+ touch "vendor/rails/TAG_#{ENV['TAG']}"
+ else
+ rails_svn = 'http://dev.rubyonrails.org/svn/rails/trunk'
+
+ if ENV['REVISION'].nil?
+ ENV['REVISION'] = /^r(\d+)/.match(%x{svn log -q --limit 1 #{rails_svn}})[1]
+ puts "REVISION not set. Using HEAD, which is revision #{ENV['REVISION']}."
+ end
+
+ touch "vendor/rails/REVISION_#{ENV['REVISION']}"
+ end
for framework in %w( railties actionpack activerecord actionmailer activesupport actionwebservice )
- system "svn export #{rails_svn}/#{framework} vendor/rails/#{framework} -r #{ENV['REVISION']}"
+ system "svn export #{rails_svn}/#{framework} vendor/rails/#{framework}" + (ENV['REVISION'] ? " -r #{ENV['REVISION']}" : "")
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.