Skip to content

Commit

Permalink
Refactor the npm postversion script
Browse files Browse the repository at this point in the history
  • Loading branch information
strugee committed Sep 1, 2017
1 parent c7b42cf commit 2f9224c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "pump.io",
"preferGlobal": "true",
"homepage": "http://pump.io/",
"version": "5.0.0-alpha.0",
"version": "5.0.0-beta.0",
"author": "Evan Prodromou <[email protected]>",
"description": "Social server with an ActivityStreams API",
"devDependencies": {
Expand Down Expand Up @@ -95,7 +95,9 @@
"prepublish": "npm run build",
"version": "npm run version:check-branch && npm run update-docs && git add README.md doc/",
"version:check-branch": "if [ \"$(git symbolic-ref HEAD)\" = refs/heads/master ]; then echo 'refusing to run `npm version` on master; bump package.json manually' 1>&2; exit 1; fi",
"postversion": "git push origin v$npm_package_version && echo $npm_package_version | grep beta > /dev/null || git push --set-upstream origin $(git symbolic-ref --short HEAD)"
"postversion": "npm run postversion:push",
"postversion:push": "git push origin v$npm_package_version && npm run --silent util:is-beta || git push --set-upstream origin $(git symbolic-ref --short HEAD)",
"util:is-beta": "echo $npm_package_version | grep beta > /dev/null"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 2f9224c

Please sign in to comment.