Skip to content

Commit

Permalink
Make it easier to publish only edge
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Jan 23, 2023
1 parent e12c465 commit df4cc9d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ namespace :release do
task :publish => ['publish:ask', 'publish:tag', 'publish:rubygems', 'publish:post_steps']

namespace :publish do
publish_base = true
publish_edge = false

task :ask do
Expand All @@ -289,8 +290,8 @@ namespace :release do
desc '** tag HEAD with current version and push to github'
task :tag => :ask do
Dir.chdir(__dir__) do
sh "git tag v#{Concurrent::VERSION}"
sh "git push origin v#{Concurrent::VERSION}"
sh "git tag v#{Concurrent::VERSION}" if publish_base
sh "git push origin v#{Concurrent::VERSION}" if publish_base
sh "git tag edge-v#{Concurrent::EDGE_VERSION}" if publish_edge
sh "git push origin edge-v#{Concurrent::EDGE_VERSION}" if publish_edge
end
Expand All @@ -299,11 +300,11 @@ namespace :release do
desc '** push all *.gem files to rubygems'
task :rubygems => :ask do
Dir.chdir(__dir__) do
sh "gem push pkg/concurrent-ruby-#{Concurrent::VERSION}.gem"
sh "gem push pkg/concurrent-ruby-#{Concurrent::VERSION}.gem" if publish_base
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"
sh "gem push pkg/concurrent-ruby-ext-#{Concurrent::VERSION}.gem" if publish_base
sh "gem push pkg/concurrent-ruby-ext-#{Concurrent::VERSION}-x64-mingw32.gem" if publish_base
sh "gem push pkg/concurrent-ruby-ext-#{Concurrent::VERSION}-x86-mingw32.gem" if publish_base
end
end

Expand Down

0 comments on commit df4cc9d

Please sign in to comment.