Skip to content

Commit df4cc9d

Browse files
committed
Make it easier to publish only edge
1 parent e12c465 commit df4cc9d

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Rakefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ namespace :release do
271271
task :publish => ['publish:ask', 'publish:tag', 'publish:rubygems', 'publish:post_steps']
272272

273273
namespace :publish do
274+
publish_base = true
274275
publish_edge = false
275276

276277
task :ask do
@@ -289,8 +290,8 @@ namespace :release do
289290
desc '** tag HEAD with current version and push to github'
290291
task :tag => :ask do
291292
Dir.chdir(__dir__) do
292-
sh "git tag v#{Concurrent::VERSION}"
293-
sh "git push origin v#{Concurrent::VERSION}"
293+
sh "git tag v#{Concurrent::VERSION}" if publish_base
294+
sh "git push origin v#{Concurrent::VERSION}" if publish_base
294295
sh "git tag edge-v#{Concurrent::EDGE_VERSION}" if publish_edge
295296
sh "git push origin edge-v#{Concurrent::EDGE_VERSION}" if publish_edge
296297
end
@@ -299,11 +300,11 @@ namespace :release do
299300
desc '** push all *.gem files to rubygems'
300301
task :rubygems => :ask do
301302
Dir.chdir(__dir__) do
302-
sh "gem push pkg/concurrent-ruby-#{Concurrent::VERSION}.gem"
303+
sh "gem push pkg/concurrent-ruby-#{Concurrent::VERSION}.gem" if publish_base
303304
sh "gem push pkg/concurrent-ruby-edge-#{Concurrent::EDGE_VERSION}.gem" if publish_edge
304-
sh "gem push pkg/concurrent-ruby-ext-#{Concurrent::VERSION}.gem"
305-
sh "gem push pkg/concurrent-ruby-ext-#{Concurrent::VERSION}-x64-mingw32.gem"
306-
sh "gem push pkg/concurrent-ruby-ext-#{Concurrent::VERSION}-x86-mingw32.gem"
305+
sh "gem push pkg/concurrent-ruby-ext-#{Concurrent::VERSION}.gem" if publish_base
306+
sh "gem push pkg/concurrent-ruby-ext-#{Concurrent::VERSION}-x64-mingw32.gem" if publish_base
307+
sh "gem push pkg/concurrent-ruby-ext-#{Concurrent::VERSION}-x86-mingw32.gem" if publish_base
307308
end
308309
end
309310

0 commit comments

Comments
 (0)