From aa395d1060f5f6bb1d83d08d0d9b6a165b3bddc5 Mon Sep 17 00:00:00 2001 From: caiyuchao Date: Wed, 30 Jul 2025 17:44:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20build=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 build.sh diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..e721ce0 --- /dev/null +++ b/build.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +[ -z "$2"] && branch='main' || branch=$2 + +# 使用说明,用来提示输入参数 +usage() { + echo "Usage: sh start.sh [system|user|auth]" + exit 1 +} + +backend(){ + cd ../agt-cloud + git pull + mvn clean package -Dmaven.test.skip=true + cd ../agt-build +} + +# 启动程序模块(必须) +frontend(){ + cd ../agt-web + git pull + pnpm build:antd + cd ../agt-build +} + + +# 根据输入参数,选择执行对应方法,不输入则执行使用说明 +case "$1" in +"backend") + backend +;; +"frontend") + frontend +;; +"stop") + stop +;; +"rm") + rm +;; +*) + usage +;; +esac