Skip to content

Commit

Permalink
chore: return to current branch after publish
Browse files Browse the repository at this point in the history
  • Loading branch information
jesustorresdev committed Sep 10, 2023
1 parent ad24656 commit fba89bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ task :publish, [:yeartag] do |t, args|
raise "Argument 'yeartag' is required."
end

current_branch = `git branch --show-current`
release_branch = "curso-#{args[:yeartag]}"
release_tag = "so#{args[:yeartag]}"

sh 'git', 'rebase', 'master', release_branch
sh 'git', 'tag', '-f', release_tag, release_branch
sh 'git', 'push', '--atomic', '-f', 'origin', release_branch, release_tag
sh 'git', 'checkout', current_branch
end

0 comments on commit fba89bd

Please sign in to comment.