aboutsummaryrefslogtreecommitdiffstats
path: root/tasks
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-04-07 15:26:13 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-04-07 15:26:13 -0700
commit347d74a03b137ab2e501c710c951a8b059df05ba (patch)
tree1733cc97005b30d20ddbed7ab83bcac64705014b /tasks
parent30b94a876f32f5024f841a6de9b5b20a014a41d3 (diff)
parent3f5eb59f7a48aa5c08efb8db6cb41cd395c990af (diff)
downloadrails-347d74a03b137ab2e501c710c951a8b059df05ba.tar.gz
rails-347d74a03b137ab2e501c710c951a8b059df05ba.tar.bz2
rails-347d74a03b137ab2e501c710c951a8b059df05ba.zip
Merge branch 'master' into adequaterecord
* master: (122 commits) Rails.application should be set inside before_configuration hook remove check for present? from delete_all Remove useless begin..end Build the reverse_order on its proper method. Use connection-specific bytea escaping Ignore order when doing count. make enums distinct per class Remove unused `subclass_controller_with_flash_type_bar` var from flash test. fix CollectionProxy delete_all documentation Added OS X specific commands to installation guide [ci skip] Recommended using homebrew for installing MySQL and PostgreSQL Fix setup of adding _flash_types test. Use SVG version of travis build status badge [skip ci] W3C CSP document moved to gihub.io URL [ci skip] sprockets-rails was released Fix the test defining the models in the right place Add CHANGELOG entry for #11650 [ci skip] Declare the assets dependency Use sass-rails 4.0.3 Make possible to use sprockets-rails 2.1 add missing parentheses to validates_with documentation [skip ci] ...
Diffstat (limited to 'tasks')
-rw-r--r--tasks/release.rb48
1 files changed, 24 insertions, 24 deletions
diff --git a/tasks/release.rb b/tasks/release.rb
index a55cb68a47..767feaf236 100644
--- a/tasks/release.rb
+++ b/tasks/release.rb
@@ -15,38 +15,37 @@ directory "pkg"
rm_f gem
end
- task :update_version_rb do
+ task :update_versions do
glob = root.dup
- glob << "/#{framework}/lib/*" unless framework == "rails"
- glob << "/version.rb"
+ if framework == "rails"
+ glob << "/version.rb"
+ else
+ glob << "/#{framework}/lib/*"
+ glob << "/gem_version.rb"
+ end
file = Dir[glob].first
ruby = File.read(file)
- if framework == "rails" || framework == "railties"
- major, minor, tiny, pre = version.split('.')
- pre = pre ? pre.inspect : "nil"
+ major, minor, tiny, pre = version.split('.')
+ pre = pre ? pre.inspect : "nil"
- ruby.gsub!(/^(\s*)MAJOR(\s*)= .*?$/, "\\1MAJOR = #{major}")
- raise "Could not insert MAJOR in #{file}" unless $1
+ ruby.gsub!(/^(\s*)MAJOR(\s*)= .*?$/, "\\1MAJOR = #{major}")
+ raise "Could not insert MAJOR in #{file}" unless $1
- ruby.gsub!(/^(\s*)MINOR(\s*)= .*?$/, "\\1MINOR = #{minor}")
- raise "Could not insert MINOR in #{file}" unless $1
+ ruby.gsub!(/^(\s*)MINOR(\s*)= .*?$/, "\\1MINOR = #{minor}")
+ raise "Could not insert MINOR in #{file}" unless $1
- ruby.gsub!(/^(\s*)TINY(\s*)= .*?$/, "\\1TINY = #{tiny}")
- raise "Could not insert TINY in #{file}" unless $1
+ ruby.gsub!(/^(\s*)TINY(\s*)= .*?$/, "\\1TINY = #{tiny}")
+ raise "Could not insert TINY in #{file}" unless $1
- ruby.gsub!(/^(\s*)PRE(\s*)= .*?$/, "\\1PRE = #{pre}")
- raise "Could not insert PRE in #{file}" unless $1
- else
- ruby.gsub!(/^(\s*)Gem::Version\.new .*?$/, "\\1Gem::Version.new \"#{version}\"")
- raise "Could not insert Gem::Version in #{file}" unless $1
- end
+ ruby.gsub!(/^(\s*)PRE(\s*)= .*?$/, "\\1PRE = #{pre}")
+ raise "Could not insert PRE in #{file}" unless $1
File.open(file, 'w') { |f| f.write ruby }
end
- task gem => %w(update_version_rb pkg) do
+ task gem => %w(update_versions pkg) do
cmd = ""
cmd << "cd #{framework} && " unless framework == "rails"
cmd << "gem build #{gemspec} && mv #{framework}-#{version}.gem #{root}/pkg/"
@@ -68,7 +67,7 @@ end
namespace :changelog do
task :release_date do
- FRAMEWORKS + ['guides'].each do |fw|
+ (FRAMEWORKS + ['guides']).each do |fw|
require 'date'
replace = '\1(' + Date.today.strftime('%B %d, %Y') + ')'
fname = File.join fw, 'CHANGELOG.md'
@@ -79,7 +78,7 @@ namespace :changelog do
end
task :release_summary do
- FRAMEWORKS + ['guides'].each do |fw|
+ (FRAMEWORKS + ['guides']).each do |fw|
puts "## #{fw}"
fname = File.join fw, 'CHANGELOG.md'
contents = File.readlines fname
@@ -93,9 +92,10 @@ namespace :changelog do
end
namespace :all do
- task :build => FRAMEWORKS.map { |f| "#{f}:build" } + ['rails:build']
- task :install => FRAMEWORKS.map { |f| "#{f}:install" } + ['rails:install']
- task :push => FRAMEWORKS.map { |f| "#{f}:push" } + ['rails:push']
+ task :build => FRAMEWORKS.map { |f| "#{f}:build" } + ['rails:build']
+ task :update_versions => FRAMEWORKS.map { |f| "#{f}:update_versions" } + ['rails:update_versions']
+ task :install => FRAMEWORKS.map { |f| "#{f}:install" } + ['rails:install']
+ task :push => FRAMEWORKS.map { |f| "#{f}:push" } + ['rails:push']
task :ensure_clean_state do
unless `git status -s | grep -v RAILS_VERSION`.strip.empty?