From b1769fe0bd6ea3b7eb7147333754d4b712831b2c Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Mon, 1 Mar 2010 23:02:55 -0500 Subject: Add `rake update_versions` task at root for quickly updating all components --- Rakefile | 22 ++++++++++++++++++++++ version.rb | 10 ++++++++++ 2 files changed, 32 insertions(+) create mode 100644 version.rb 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 diff --git a/version.rb b/version.rb new file mode 100644 index 0000000000..1dd8fa0ec7 --- /dev/null +++ b/version.rb @@ -0,0 +1,10 @@ +module Rails + module VERSION #:nodoc: + MAJOR = 3 + MINOR = 0 + TINY = 0 + BUILD = "beta1" + + STRING = [MAJOR, MINOR, TINY, BUILD].join('.') + end +end -- cgit v1.2.3