aboutsummaryrefslogtreecommitdiffstats
path: root/Rakefile
diff options
context:
space:
mode:
authorBryan Helmkamp <bryan@brynary.com>2010-03-01 23:02:55 -0500
committerBryan Helmkamp <bryan@brynary.com>2010-03-02 00:32:41 -0500
commitb1769fe0bd6ea3b7eb7147333754d4b712831b2c (patch)
tree3220daf8cc0ffe9607d045365d33204b69fb1103 /Rakefile
parenta0e8eca30bc1f3cf7519bea37456cbfc98b56047 (diff)
downloadrails-b1769fe0bd6ea3b7eb7147333754d4b712831b2c.tar.gz
rails-b1769fe0bd6ea3b7eb7147333754d4b712831b2c.tar.bz2
rails-b1769fe0bd6ea3b7eb7147333754d4b712831b2c.zip
Add `rake update_versions` task at root for quickly updating all components
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 4b14f8a2f1..0c1c240410 100644
--- a/Rakefile
+++ b/Rakefile
@@ -123,3 +123,25 @@ task :pdoc => :rdoc do
system %(cd #{project} && #{$0} pdoc)
end
end
+
+task :update_versions do
+ constants = {
+ "activesupport" => "ActiveSupport",
+ "activemodel" => "ActiveModel",
+ "actionpack" => "ActionPack",
+ "actionmailer" => "ActionMailer",
+ "activeresource" => "ActiveResource",
+ "activerecord" => "ActiveRecord",
+ "railties" => "Rails"
+ }
+
+ version_file = File.read("version.rb")
+
+ PROJECTS.each do |project|
+ Dir["#{project}/lib/*/version.rb"].each do |file|
+ File.open(file, "w") do |f|
+ f.write version_file.gsub(/Rails/, constants[project])
+ end
+ end
+ end
+end