Refactor zip dist procedure

pull/9/head
johnniang 2019-05-21 12:14:51 +08:00
parent 1cf09ac1ba
commit b612530b81
2 changed files with 5 additions and 3 deletions

View File

@ -7,9 +7,7 @@ jobs:
- stage: build
script:
- npm run build
- "PACKAGE_VERSION=$(sed -nE 's/^\s*\"version\": \"(.*?)",$/\1/p' package.json)""
- echo "Halo admin version $PACKAGE_VERSION"
- zip -r dist/halo-admin-$PACKAGE_VERSION.zip dist
- scripts/zip_dist.sh
- stage: release
script: echo "Releasing to Github Release..."
deploy:

4
scripts/zip_dist.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
PACKAGE_VERSION=$(sed -nE 's/^\s*"version": "(.*?)",$/\1/p' package.json)
echo "Halo admin version $PACKAGE_VERSION"
zip -r dist/halo-admin-$PACKAGE_VERSION.zip dist