提交 b1769fe0 编写于 作者: B Bryan Helmkamp

Add `rake update_versions` task at root for quickly updating all components

上级 a0e8eca3
......@@ -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
module Rails
module VERSION #:nodoc:
MAJOR = 3
MINOR = 0
TINY = 0
BUILD = "beta1"
STRING = [MAJOR, MINOR, TINY, BUILD].join('.')
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册