xiatian il y a 2 ans
Parent
commit
9e3a78ebb3
2 fichiers modifiés avec 31 ajouts et 1 suppressions
  1. 30 0
      jenkins.sh
  2. 1 1
      vite.config.ts

+ 30 - 0
jenkins.sh

@@ -0,0 +1,30 @@
+#!/bin/bash
+set -e # 如果构建失败,则退出,不能删除旧的包
+if [ "$#" -ne 1 ] ; then
+  echo "Usage: $0 BUILD_ENV" >&2
+  exit 1
+fi
+
+pwd
+
+echo “build env: $1”
+
+pwd
+
+yarn
+npm run build:$1
+
+mkdir -p ~/project/exam-score-statistic/static-new/admin/temp
+cp -r  dist ~/project/exam-score-statistic/static-new/admin/temp
+
+cd ~/project/exam-score-statistic/static-new/admin
+if [ -d "dist" ]; then
+  currentTime=`date "+%Y%m%d%H%M%S"`
+  echo "dist backup... $currentTime"
+  tar cf admin-bak-$currentTime.tar.gz dist
+  rm -rf dist/*
+fi
+
+mv temp/dist .
+rm -rf temp
+echo "ok..."

+ 1 - 1
vite.config.ts

@@ -3,7 +3,7 @@ import vue from "@vitejs/plugin-vue";
 import ViteComponents from "unplugin-vue-components/vite";
 import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";
 
-const SERVER_URL = "http://192.168.10.108:7180";
+const SERVER_URL = "http://localhost:7180";
 // const SERVER_URL = "http://192.168.10.138:13800";
 // const SERVER_URL = "http://192.168.10.39:7180";
 // const SERVER_URL = "http://192.168.10.54:8001";