shuisheng 2 rokov pred
rodič
commit
fba267d89b
3 zmenil súbory, kde vykonal 15 pridanie a 4 odobranie
  1. 0 0
      deploy/handleGiteeJenkins.mjs
  2. 13 2
      deploy/static-build.sh
  3. 2 2
      package.json

+ 0 - 0
handleGiteeJenkins.mjs → deploy/handleGiteeJenkins.mjs


+ 13 - 2
static-build.sh → deploy/static-build.sh

@@ -4,9 +4,9 @@
 # Date: 2022-04-26 01:54:48
 # Description: https://github.com/galaxy-s10/sh/blob/master/build.sh
 # Email: 2274751790@qq.com
-# FilePath: /billd-live/static-build.sh
+# FilePath: /billd-live/deploy/static-build.sh
 # Github: https://github.com/galaxy-s10
-# LastEditTime: 2023-04-28 13:06:17
+# LastEditTime: 2024-01-25 10:09:40
 # LastEditors: shuisheng
 ###
 
@@ -24,6 +24,17 @@ PORT=$4         #约定$4为端口号
 TAG=$5          #约定$5为git标签
 PUBLICDIR=/node #约定公共目录为/node
 
+# 注意:要先进入项目所在的目录,然后再执行命令!!!
+if [ $ENV = 'beta' ]; then
+  cd $PUBLICDIR/$JOBNAME/$ENV
+elif [ $ENV = 'preview' ]; then
+  cd $PUBLICDIR/$JOBNAME/$ENV
+elif [ $ENV = 'prod' ]; then
+  cd $PUBLICDIR/$JOBNAME/$ENV
+else
+  cd $PUBLICDIR/$JOBNAME
+fi
+
 echo 删除node_modules:
 rm -rf node_modules
 

+ 2 - 2
package.json

@@ -9,7 +9,7 @@
   "scripts": {
     "build": "webpack --config ./script/config/webpack.common.ts --env production",
     "commit": "cz",
-    "copy": "ts-node ./handleGiteeJenkins.mjs",
+    "copy": "ts-node ./deploy/handleGiteeJenkins.mjs",
     "lint": "eslint --config ./.eslintrc.js . --ext .js,.jsx,.ts,.tsx,.vue --cache",
     "lint:fix": "eslint --config ./.eslintrc.js . --ext .js,.jsx,.ts,.tsx,.vue --cache --fix",
     "prepare": "husky install",
@@ -124,4 +124,4 @@
     "webpackbar": "^5.0.2",
     "windicss-webpack-plugin": "^1.7.7"
   }
-}
+}