fix: NEZ-1909 快照模板自动编译

This commit is contained in:
高 昊
2022-06-13 08:47:51 +00:00
parent 39f36addde
commit 15860b087c

View File

@@ -37,11 +37,14 @@ dev_build:
- echo "npm install ..."
- npm install --registry=http://registry.npmmirror.com
- echo "npm run build"
- npm run build
- cd /builds/nezha/nezha-fronted/nezha-fronted/dist
# 链接 minio 引入模板
# 编译 上传模板
- npm run build:html
- mc alias set nz $MINIO_HOST $MINIO_USER $MINIO_PWD
- mc cp dist/index.html nz/depends/template/snapshot_template.html
- npm run build
- cd /builds/nezha/nezha-fronted/nezha-fronted/dist
- mc cp nz/depends/template/snapshot_template.html ./snapshot_template.html
- rm -rf nz-gui*.zip
- export FILE_NAME=nz-gui-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA.zip
@@ -80,9 +83,13 @@ rel_build:
- cd nezha-fronted
- npm install --registry=http://registry.npmmirror.com
- echo "npm run build"
- npm run build:html
- mc alias set nz $MINIO_HOST $MINIO_USER $MINIO_PWD
- mc cp dist/index.html nz/depends/template/snapshot_template.html
- npm run build
- cd /builds/nezha/nezha-fronted/nezha-fronted/dist
- mc alias set nz $MINIO_HOST $MINIO_USER $MINIO_PWD
- mc cp nz/depends/template/snapshot_template.html ./snapshot_template.html
- zip -m nz-gui*.zip ./snapshot_template.html
- mv nz-gui*.zip nz-gui-$CI_COMMIT_SHORT_SHA.zip