Skip to content

Commit

Permalink
update releast task to switch use main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
copiousfreetime committed Dec 28, 2022
1 parent b02011d commit 93f6f74
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tasks/default.rake
Original file line number Diff line number Diff line change
Expand Up @@ -213,19 +213,19 @@ end
# Release - the steps we go through to do a final release, this is pulled from
# a compbination of mojombo's rakegem, hoe and hoe-git
#
# 1) make sure we are on the master branch
# 1) make sure we are on the main branch
# 2) make sure there are no uncommitted items
# 3) check the manifest and make sure all looks good
# 4) build the gem
# 5) do an empty commit to have the commit message of the version
# 6) tag that commit as the version
# 7) push master
# 7) push main
# 8) push the tag
# 7) pus the gem
#------------------------------------------------------------------------------
task :release_check do
unless `git branch` =~ /^\* master$/
abort "You must be on the master branch to release!"
unless `git branch` =~ /^\* main$/
abort "You must be on the main branch to release!"
end
unless `git status` =~ /^nothing to commit/m
abort "Nope, sorry, you have unfinished business"
Expand All @@ -236,7 +236,7 @@ desc "Create tag v#{This.version}, build and push #{This.platform_gemspec.full_n
task :release => [ :release_check, 'manifest:check', :gem ] do
sh "git commit --allow-empty -a -m 'Release #{This.version}'"
sh "git tag -a -m 'v#{This.version}' v#{This.version}"
sh "git push origin master"
sh "git push origin main"
sh "git push origin v#{This.version}"
sh "gem push pkg/#{This.platform_gemspec.full_name}.gem"
end

0 comments on commit 93f6f74

Please sign in to comment.