aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2017-07-25 21:58:33 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2017-07-25 22:00:07 +0200
commit6f9b01c056cd2f3a4761baf78df207e1154f1b06 (patch)
tree490b07b0d62b40773a15fe1a67cd44b0507e24b7
parent0267019a55540bcc13952cb720c7869a76168014 (diff)
downloadrails-6f9b01c056cd2f3a4761baf78df207e1154f1b06.tar.gz
rails-6f9b01c056cd2f3a4761baf78df207e1154f1b06.tar.bz2
rails-6f9b01c056cd2f3a4761baf78df207e1154f1b06.zip
Use exact Rails version when verifying.
-rw-r--r--tasks/release.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/tasks/release.rb b/tasks/release.rb
index ac13612b91..b3bbbb0076 100644
--- a/tasks/release.rb
+++ b/tasks/release.rb
@@ -154,8 +154,13 @@ namespace :all do
task verify: :install do
app_name = "pkg/verify-#{version}-#{Time.now.to_i}"
- sh "rails new #{app_name}"
+ sh "rails _#{version}_ new #{app_name} --skip-bundle" # Generate with the right version.
cd app_name
+
+ # Replace the generated gemfile entry with the exact version.
+ File.write("Gemfile", File.read("Gemfile").sub(/^gem 'rails.*/, "gem 'rails', '#{version}'"))
+ sh "bundle"
+
sh "rails generate scaffold user name admin:boolean && rails db:migrate"
puts "Booting a Rails server. Verify the release by:"