File tree 2 files changed +25
-1
lines changed
2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ require "railties/lib/rails/api/task"
7
7
desc "Build gem files for all projects"
8
8
task build : "all:build"
9
9
10
+ desc "Build, install and verify the gem files in a generated Rails app."
11
+ task verify : "all:verify"
12
+
10
13
desc "Prepare the release"
11
14
task prep_release : "all:prep_release"
12
15
Original file line number Diff line number Diff line change 142
142
task push : FRAMEWORKS . map { |f | "#{ f } :push" } + [ "rails:push" ]
143
143
144
144
task :ensure_clean_state do
145
- unless `git status -s | grep -v 'RAILS_VERSION\\ |CHANGELOG\\ |Gemfile.lock\\ |package.json\\ |version.rb'` . strip . empty?
145
+ unless `git status -s | grep -v 'RAILS_VERSION\\ |CHANGELOG\\ |Gemfile.lock\\ |package.json\\ |version.rb\\ |tasks/release.rb '` . strip . empty?
146
146
abort "[ABORTING] `git status` reports a dirty tree. Make sure all changes are committed"
147
147
end
148
148
152
152
end
153
153
end
154
154
155
+ task verify : :install do
156
+ app_name = "pkg/verify-#{ version } -#{ Time . now . to_i } "
157
+ sh "rails new #{ app_name } "
158
+ cd app_name
159
+ sh "rails generate scaffold user name admin:boolean && rails db:migrate"
160
+
161
+ puts "Booting a Rails server. Verify the release by:"
162
+ puts
163
+ puts "- Seeing the correct release number on the root page"
164
+ puts "- Viewing /users"
165
+ puts "- Creating a user"
166
+ puts "- Updating a user (e.g. disable the admin flag)"
167
+ puts "- Deleting a user on /users"
168
+ puts "- Whatever else you want."
169
+ begin
170
+ sh "rails server"
171
+ rescue Interrupt
172
+ # Server passes along interrupt. Prevent halting verify task.
173
+ end
174
+ end
175
+
155
176
task :bundle do
156
177
sh "bundle check"
157
178
end
You can’t perform that action at this time.
0 commit comments