diff --git a/rake/release.rake b/rake/release.rake index 832b5bb3..e9b63845 100644 --- a/rake/release.rake +++ b/rake/release.rake @@ -6,7 +6,8 @@ desc "Release #{name} v#{version}" task :release => :build do - unless `git branch` =~ %r!^\* master$! + current_branch = `git branch`.to_s.strip.match(%r!^\* (.+)$!)[1] + unless current_branch == "master" || current_branch.end_with?("-stable") puts "You must be on the master branch to release!" exit! end