Skip to content

Commit

Permalink
feat: publish only if commit+push succeed (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
joeledwards authored and bcoe committed Jan 3, 2018
1 parent 45fcad5 commit c5e1ee2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ _how it works:_
3. when you're ready to release to npm:
1. `git checkout master; git pull origin master`
2. run `standard-version`
3. `git push --follow-tags origin master; npm publish`
3. `git push --follow-tags origin master && npm publish`

`standard-version` does the following:

Expand Down
2 changes: 1 addition & 1 deletion lib/lifecycles/tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function execTag (newVersion, pkgPrivate, args) {
return runExec(args, 'git tag ' + tagOption + args.tagPrefix + newVersion + ' -m "' + formatCommitMessage(args.message, newVersion) + '"')
.then(() => {
var message = 'git push --follow-tags origin master'
if (pkgPrivate !== true) message += '; npm publish'
if (pkgPrivate !== true) message += ' && npm publish'
if (args.prerelease !== undefined) message += ' --tag prerelease'

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

0 comments on commit c5e1ee2

Please sign in to comment.