Skip to content

Commit 304b49a

Browse files
KarunaLakshmanbcoe
authored andcommitted
feat: suggest branch name other than master (#331)
1 parent 8317c9e commit 304b49a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/lifecycles/tag.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ function execTag (newVersion, pkgPrivate, args) {
2525
}
2626
checkpoint(args, 'tagging release %s%s', [args.tagPrefix, newVersion])
2727
return runExec(args, 'git tag ' + tagOption + args.tagPrefix + newVersion + ' -m "' + formatCommitMessage(args.message, newVersion) + '"')
28-
.then(() => {
29-
let message = 'git push --follow-tags origin master'
28+
.then(() => runExec(args, 'git rev-parse --abbrev-ref HEAD'))
29+
.then((currentBranch) => {
30+
let message = 'git push --follow-tags origin ' + currentBranch.trim()
3031
if (pkgPrivate !== true) {
3132
message += ' && npm publish'
3233
if (args.prerelease !== undefined) {

0 commit comments

Comments
 (0)