Skip to content

Commit

Permalink
do not allow release unless on master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
mojombo committed Apr 4, 2010
1 parent a54ed22 commit 8924ec6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Rakefile
Expand Up @@ -48,6 +48,10 @@ end

if defined?(Gem)
task :release => :build do
unless `git branch` =~ /^\* master$/
puts "You must be on the master branch to release!"
exit!
end
sh "git commit --allow-empty -a -m 'up to #{source_version}'"
sh "git tag v#{source_version}"
sh "git push origin master --tags"
Expand Down

0 comments on commit 8924ec6

Please sign in to comment.