Skip to content

Commit 2f9224c

Browse files
committed
Refactor the npm postversion script
1 parent c7b42cf commit 2f9224c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "pump.io",
33
"preferGlobal": "true",
44
"homepage": "http://pump.io/",
5-
"version": "5.0.0-alpha.0",
5+
"version": "5.0.0-beta.0",
66
"author": "Evan Prodromou <[email protected]>",
77
"description": "Social server with an ActivityStreams API",
88
"devDependencies": {
@@ -95,7 +95,9 @@
9595
"prepublish": "npm run build",
9696
"version": "npm run version:check-branch && npm run update-docs && git add README.md doc/",
9797
"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",
98-
"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)"
98+
"postversion": "npm run postversion:push",
99+
"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)",
100+
"util:is-beta": "echo $npm_package_version | grep beta > /dev/null"
99101
},
100102
"repository": {
101103
"type": "git",

0 commit comments

Comments
 (0)