build: extract build command

This commit is contained in:
Enix 2019-04-08 10:22:04 +08:00
parent 80fa2b1535
commit ab5d2d91c9
No known key found for this signature in database
GPG key ID: FE06F5DFC1C9B8E4
2 changed files with 5 additions and 4 deletions

View file

@ -9,8 +9,9 @@
"scripts": {
"postinstall": "node scripts/generate-octicon.js",
"start": "webpack --watch",
"postversion": "node scripts/version.js && npm run build",
"build": "./scripts/roll.sh"
"postversion": "node scripts/version.js && npm run roll",
"build": "NODE_ENV=production webpack",
"roll": "./scripts/roll.sh"
},
"dependencies": {
"@sentry/browser": "^4.6.4",

View file

@ -1,6 +1,6 @@
#!/bin/sh
rm -rf dist
NODE_ENV=production yarn webpack
yarn build
GITAKO_VERSION=v$(node scripts/get-version.js)
echo "Got version $GITAKO_VERSION"
@ -12,4 +12,4 @@ yarn sentry-cli releases finalize "$GITAKO_VERSION"
cd dist
rm -f ./gitako.zip
zip -r gitako.zip * -x *.map
zip -r gitako.zip * -x *.map