diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2df9dd9e6..738677a27 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,10 +38,16 @@ dev_build: - 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 + # 根据提交信息,判断本次是否 编译上传模板 + - > + if [[ $CI_COMMIT_MESSAGE =~ "snapshotTemplate" ]]; then + echo "Update snapshot template ..." + npm run build:html + mc cp dist/index.html nz/depends/template/snapshot_template.html + else + echo "No need to update snapshot template" + fi - npm run build - cd /builds/nezha/nezha-fronted/nezha-fronted/dist @@ -50,13 +56,7 @@ dev_build: - export FILE_NAME=nz-gui-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA.zip # 生成 git log 日志文件 - sed -i 's+
+更新记录\n+g' ./index.html; - # echo "" > ./static/git-log.html - # echo "
" >> ./static/git-log.html - # echo '' >> ./static/git-log.html - # echo "" >> ./static/git-log.html - # echo "
" >> ./static/git-log.html
- "git log -100 --pretty=format:'%ad : %s' >> ./static/git-log.log"
- # echo "