1
0

ref: 打包脚本调整支持切换分支

This commit is contained in:
TsMask
2025-03-20 16:16:30 +08:00
parent 0f1aae7c9a
commit 0aeb0673ee
2 changed files with 8 additions and 8 deletions

View File

@@ -2,14 +2,14 @@
# front-end Catalog
WebDir=/root/omc.git/fe.ems.vue3
WebBranch=lichang
BuildWeb=""
# back-end catalog
ApiDir=/root/omc.git/be.ems
ApiBranch=lichang
BuildApi=""
# Package Catalog
BuildDir=/root/omc.git/build.ems
# Default Not Remove Chinese Language
RemoveChinese=""
# Default Version Value
VERSION="2.2503.2"
@@ -21,7 +21,6 @@ usage() {
echo " -v Specify the version"
echo " --web Build Web ($WebDir)"
echo " --api Build Api ($ApiDir)"
echo " --rc Remove Chinese Language"
echo " -h Display this help message"
echo
exit 1
@@ -32,7 +31,6 @@ while [[ $# -gt 0 ]]; do
-v) VERSION="$2"; shift 2 ;;
--web) BuildWeb="build"; shift ;;
--api) BuildApi="build"; shift ;;
--rc) RemoveChinese="remove"; shift ;;
*) usage ;;
esac
done
@@ -44,7 +42,7 @@ if [ -n "$BuildWeb" ]; then
cd $WebDir
git checkout .
git pull
git checkout lichang
git checkout $WebBranch
git pull
# RemoveChinese
@@ -70,7 +68,7 @@ if [ -n "$BuildApi" ]; then
cd $ApiDir
git checkout .
git pull
git checkout lichang
git checkout $ApiBranch
git pull
# RemoveChinese

6
pkg.sh
View File

@@ -2,9 +2,11 @@
# front-end Catalog
WebDir=/root/omc.git/fe.ems.vue3
WebBranch=lichang
BuildWeb=""
# back-end catalog
ApiDir=/root/omc.git/be.ems
ApiBranch=lichang
BuildApi=""
# Package Catalog
BuildDir=/root/omc.git/build.ems
@@ -40,7 +42,7 @@ if [ -n "$BuildWeb" ]; then
cd $WebDir
git checkout .
git pull
git checkout lichang
git checkout $WebBranch
git pull
npm install --registry https://registry.npmmirror.com
@@ -60,7 +62,7 @@ if [ -n "$BuildApi" ]; then
cd $ApiDir
git checkout .
git pull
git checkout lichang
git checkout $ApiBranch
git pull
MOD_CONFIG="be.ems/src/framework/config"