@@ -283,28 +283,36 @@ namespace :release do
283283 task :publish => [ 'publish:ask' , 'publish:tag' , 'publish:rubygems' , 'publish:post_steps' ]
284284
285285 namespace :publish do
286+ publish_edge = false
287+
286288 task :ask do
287289 begin
288- STDOUT . puts 'Do you want to publish? (y/n)'
290+ STDOUT . puts 'Do you want to publish anything ? (y/n)'
289291 input = STDIN . gets . strip . downcase
290292 end until %w( y n ) . include? ( input )
291293 exit 1 if input == 'n'
294+ begin
295+ STDOUT . puts 'Do you want to publish edge? (y/n)'
296+ input = STDIN . gets . strip . downcase
297+ end until %w( y n ) . include? ( input )
298+ publish_edge = input == 'y'
292299 end
293300
294301 desc '** tag HEAD with current version and push to github'
295302 task :tag do
296303 Dir . chdir ( __dir__ ) do
297304 sh "git tag v#{ Concurrent ::VERSION } "
298- sh "git tag edge-v#{ Concurrent ::EDGE_VERSION } "
299- sh "git push origin v#{ Concurrent ::VERSION } edge-v#{ Concurrent ::EDGE_VERSION } "
305+ sh "git push origin v#{ Concurrent ::VERSION } "
306+ sh "git tag edge-v#{ Concurrent ::EDGE_VERSION } " if publish_edge
307+ sh "git push origin edge-v#{ Concurrent ::EDGE_VERSION } " if publish_edge
300308 end
301309 end
302310
303311 desc '** push all *.gem files to rubygems'
304312 task :rubygems do
305313 Dir . chdir ( __dir__ ) do
306314 sh "gem push pkg/concurrent-ruby-#{ Concurrent ::VERSION } .gem"
307- sh "gem push pkg/concurrent-ruby-edge-#{ Concurrent ::EDGE_VERSION } .gem"
315+ sh "gem push pkg/concurrent-ruby-edge-#{ Concurrent ::EDGE_VERSION } .gem" if publish_edge
308316 sh "gem push pkg/concurrent-ruby-ext-#{ Concurrent ::VERSION } .gem"
309317 sh "gem push pkg/concurrent-ruby-ext-#{ Concurrent ::VERSION } -x64-mingw32.gem"
310318 sh "gem push pkg/concurrent-ruby-ext-#{ Concurrent ::VERSION } -x86-mingw32.gem"
0 commit comments