From 9fe401e14b8de22ca27c4dc4575e382b756d7811 Mon Sep 17 00:00:00 2001 From: Petr Chalupa Date: Tue, 6 Nov 2018 10:07:35 +0100 Subject: [PATCH] Allow publishing only core --- Rakefile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index b6827341d..d98aa6c58 100644 --- a/Rakefile +++ b/Rakefile @@ -283,20 +283,28 @@ namespace :release do task :publish => ['publish:ask', 'publish:tag', 'publish:rubygems', 'publish:post_steps'] namespace :publish do + publish_edge = false + task :ask do begin - STDOUT.puts 'Do you want to publish? (y/n)' + STDOUT.puts 'Do you want to publish anything? (y/n)' input = STDIN.gets.strip.downcase end until %w(y n).include?(input) exit 1 if input == 'n' + begin + STDOUT.puts 'Do you want to publish edge? (y/n)' + input = STDIN.gets.strip.downcase + end until %w(y n).include?(input) + publish_edge = input == 'y' end desc '** tag HEAD with current version and push to github' task :tag do Dir.chdir(__dir__) do sh "git tag v#{Concurrent::VERSION}" - sh "git tag edge-v#{Concurrent::EDGE_VERSION}" - sh "git push origin v#{Concurrent::VERSION} edge-v#{Concurrent::EDGE_VERSION}" + sh "git push origin v#{Concurrent::VERSION}" + sh "git tag edge-v#{Concurrent::EDGE_VERSION}" if publish_edge + sh "git push origin edge-v#{Concurrent::EDGE_VERSION}" if publish_edge end end @@ -304,7 +312,7 @@ namespace :release do task :rubygems do Dir.chdir(__dir__) do sh "gem push pkg/concurrent-ruby-#{Concurrent::VERSION}.gem" - sh "gem push pkg/concurrent-ruby-edge-#{Concurrent::EDGE_VERSION}.gem" + sh "gem push pkg/concurrent-ruby-edge-#{Concurrent::EDGE_VERSION}.gem" if publish_edge sh "gem push pkg/concurrent-ruby-ext-#{Concurrent::VERSION}.gem" sh "gem push pkg/concurrent-ruby-ext-#{Concurrent::VERSION}-x64-mingw32.gem" sh "gem push pkg/concurrent-ruby-ext-#{Concurrent::VERSION}-x86-mingw32.gem"