From 2f9442c1d4470a1edc76c06cbac3097ae687c9b0 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 5 Mar 2006 21:38:51 +0000 Subject: Added tracking of database and framework versions in script/about #4088 [charles.gerungan@gmail.com/Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3783 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/tasks/framework.rake | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'railties/lib/tasks') diff --git a/railties/lib/tasks/framework.rake b/railties/lib/tasks/framework.rake index 07b680f749..9e39e02edb 100644 --- a/railties/lib/tasks/framework.rake +++ b/railties/lib/tasks/framework.rake @@ -38,13 +38,20 @@ 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 -qr HEAD log #{rails_svn}})[1] + puts "REVISION not set. Using HEAD, which is revision #{ENV['REVISION']}." + end + rm_rf "vendor/rails" mkdir_p "vendor/rails" - revision_switch = ENV['REVISION'] ? " -r #{ENV['REVISION']}" : '' + touch "vendor/rails/REVISION_#{ENV['REVISION']}" for framework in %w( railties actionpack activerecord actionmailer activesupport actionwebservice ) - system "svn export http://dev.rubyonrails.org/svn/rails/trunk/#{framework} vendor/rails/#{framework} #{revision_switch}" + system "svn export #{rails_svn}/#{framework} vendor/rails/#{framework} -r #{ENV['REVISION']}" end end end -- cgit v1.2.3