Skip to content

Commit c5e1ee2

Browse files
joeledwardsbcoe
authored andcommitted
feat: publish only if commit+push succeed (#229)
1 parent 45fcad5 commit c5e1ee2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ _how it works:_
2020
3. when you're ready to release to npm:
2121
1. `git checkout master; git pull origin master`
2222
2. run `standard-version`
23-
3. `git push --follow-tags origin master; npm publish`
23+
3. `git push --follow-tags origin master && npm publish`
2424

2525
`standard-version` does the following:
2626

lib/lifecycles/tag.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function execTag (newVersion, pkgPrivate, args) {
2727
return runExec(args, 'git tag ' + tagOption + args.tagPrefix + newVersion + ' -m "' + formatCommitMessage(args.message, newVersion) + '"')
2828
.then(() => {
2929
var message = 'git push --follow-tags origin master'
30-
if (pkgPrivate !== true) message += '; npm publish'
30+
if (pkgPrivate !== true) message += ' && npm publish'
3131
if (args.prerelease !== undefined) message += ' --tag prerelease'
3232

3333
checkpoint(args, 'Run `%s` to publish', [message], chalk.blue(figures.info))

0 commit comments

Comments
 (0)