Skip to content

Commit

Permalink
feat: suggest branch name other than master (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
KarunaLakshman authored and bcoe committed May 5, 2019
1 parent 8317c9e commit 304b49a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/lifecycles/tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ function execTag (newVersion, pkgPrivate, args) {
}
checkpoint(args, 'tagging release %s%s', [args.tagPrefix, newVersion])
return runExec(args, 'git tag ' + tagOption + args.tagPrefix + newVersion + ' -m "' + formatCommitMessage(args.message, newVersion) + '"')
.then(() => {
let message = 'git push --follow-tags origin master'
.then(() => runExec(args, 'git rev-parse --abbrev-ref HEAD'))
.then((currentBranch) => {
let message = 'git push --follow-tags origin ' + currentBranch.trim()
if (pkgPrivate !== true) {
message += ' && npm publish'
if (args.prerelease !== undefined) {
Expand Down

0 comments on commit 304b49a

Please sign in to comment.