Skip to content

Commit

Permalink
guard against releases from a branch
Browse files Browse the repository at this point in the history
  • Loading branch information
bdurand committed Jul 19, 2023
1 parent 6f909f5 commit 51f3dc7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ YARD::Rake::YardocTask.new(:yard)

require "bundler/gem_tasks"

task :release do
unless `git rev-parse --abbrev-ref HEAD`.chomp == "master"
warn "Gem can only be released from the master branch"
exit 1
end
end

require "rspec/core/rake_task"

RSpec::Core::RakeTask.new(:spec)
Expand Down

0 comments on commit 51f3dc7

Please sign in to comment.