aboutsummaryrefslogtreecommitdiffstats
path: root/tasks
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2017-07-22 17:49:40 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2017-07-22 21:17:25 +0200
commit1e7acf844ba04cb4abf02737ee8bebb2ecce6012 (patch)
treec4e530b6c1ca3fa404c51667c734007006f98448 /tasks
parentc1972c264074211fe77cd61cc06bf04ddadf5277 (diff)
downloadrails-1e7acf844ba04cb4abf02737ee8bebb2ecce6012.tar.gz
rails-1e7acf844ba04cb4abf02737ee8bebb2ecce6012.tar.bz2
rails-1e7acf844ba04cb4abf02737ee8bebb2ecce6012.zip
Add task to verify a release.
Basically revises the release flow to: * Update the version in RAILS_VERSION + rake changelog:header * Run rake all:verify (click around in the booted app) * If that checks out, run rake release.
Diffstat (limited to 'tasks')
-rw-r--r--tasks/release.rb23
1 files changed, 22 insertions, 1 deletions
diff --git a/tasks/release.rb b/tasks/release.rb
index 038fdc584a..ae16e6b80c 100644
--- a/tasks/release.rb
+++ b/tasks/release.rb
@@ -142,7 +142,7 @@ namespace :all do
task push: FRAMEWORKS.map { |f| "#{f}:push" } + ["rails:push"]
task :ensure_clean_state do
- unless `git status -s | grep -v 'RAILS_VERSION\\|CHANGELOG\\|Gemfile.lock\\|package.json\\|version.rb'`.strip.empty?
+ unless `git status -s | grep -v 'RAILS_VERSION\\|CHANGELOG\\|Gemfile.lock\\|package.json\\|version.rb\\|tasks/release.rb'`.strip.empty?
abort "[ABORTING] `git status` reports a dirty tree. Make sure all changes are committed"
end
@@ -152,6 +152,27 @@ namespace :all do
end
end
+ task verify: :install do
+ app_name = "pkg/verify-#{version}-#{Time.now.to_i}"
+ sh "rails new #{app_name}"
+ cd app_name
+ sh "rails generate scaffold user name admin:boolean && rails db:migrate"
+
+ puts "Booting a Rails server. Verify the release by:"
+ puts
+ puts "- Seeing the correct release number on the root page"
+ puts "- Viewing /users"
+ puts "- Creating a user"
+ puts "- Updating a user (e.g. disable the admin flag)"
+ puts "- Deleting a user on /users"
+ puts "- Whatever else you want."
+ begin
+ sh "rails server"
+ rescue Interrupt
+ # Server passes along interrupt. Prevent halting verify task.
+ end
+ end
+
task :bundle do
sh "bundle check"
end