@@ -140,3 +140,50 @@ begin
140
140
rescue LoadError => e
141
141
puts 'YARD is not installed, skipping documentation task definitions: ' + e . message
142
142
end
143
+
144
+ namespace :release do
145
+ # Depends on environment of @pitr-ch
146
+
147
+ mri_version = '2.4.3'
148
+ jruby_version = 'jruby-9.1.17.0'
149
+
150
+ task :build => 'repackage:all'
151
+
152
+ task :test do
153
+ old = ENV [ 'RBENV_VERSION' ]
154
+
155
+ ENV [ 'RBENV_VERSION' ] = mri_version
156
+ sh 'rbenv version'
157
+ sh 'bundle exec rake spec:installed'
158
+
159
+ ENV [ 'RBENV_VERSION' ] = jruby_version
160
+ sh 'rbenv version'
161
+ sh 'bundle exec rake spec:installed'
162
+
163
+ puts 'Windows build is untested'
164
+
165
+ ENV [ 'RBENV_VERSION' ] = old
166
+ end
167
+
168
+ task :push do
169
+ sh 'git fetch'
170
+ sh 'test $(git show-ref --verify --hash refs/heads/master) = $(git show-ref --verify --hash refs/remotes/github/master)'
171
+
172
+ sh "git tag v#{ Concurrent ::VERSION } "
173
+ sh "git tag edge-v#{ Concurrent ::EDGE_VERSION } "
174
+ sh "git push github v#{ Concurrent ::VERSION } edge-v#{ Concurrent ::EDGE_VERSION } "
175
+
176
+ sh "gem push pkg/concurrent-ruby-#{ Concurrent ::VERSION } .gem"
177
+ sh "gem push pkg/concurrent-ruby-edge-#{ Concurrent ::EDGE_VERSION } .gem"
178
+ sh "gem push pkg/concurrent-ruby-ext-#{ Concurrent ::VERSION } .gem"
179
+ sh "gem push pkg/concurrent-ruby-ext-#{ Concurrent ::VERSION } -x64-mingw32.gem"
180
+ sh "gem push pkg/concurrent-ruby-ext-#{ Concurrent ::VERSION } -x86-mingw32.gem"
181
+ end
182
+
183
+ task :notify do
184
+ puts 'Manually: create a release on GitHub with relevant changelog part'
185
+ puts 'Manually: send email same as release with relevant changelog part'
186
+ puts 'Manually: update documentation'
187
+ puts ' $ bundle exec rake yard:push'
188
+ end
189
+ end
0 commit comments