1
0

fix: 更新构建脚本中的分支和版本信息

This commit is contained in:
TsMask
2025-05-16 14:29:38 +08:00
parent 952e55140b
commit 0fe95af9c3
4 changed files with 14 additions and 79 deletions

25
pkg.sh
View File

@@ -2,17 +2,17 @@
# front-end Catalog
WebDir=/root/omc.git/fe.ems.vue3
WebBranch=main
WebBranch=lichang
BuildWeb=""
# back-end catalog
# back-end Catalog
ApiDir=/root/omc.git/be.ems
ApiBranch=main
ApiBranch=lichang
BuildApi=""
# Package Catalog
BuildDir=/root/omc.git/build.ems
BuildBranch=main
BuildBranch=lichang
# Default Version Value
VERSION="2.2503.2"
VERSION="2.2505.2"
# usage
usage() {
@@ -20,10 +20,8 @@ usage() {
echo
echo "Build Software Package OPTION:"
echo " -v Specify the version"
echo " --web Build Web ($WebDir)"
echo " -webBranch Web Branch ($WebBranch)"
echo " --api Build Api ($ApiDir)"
echo " -apiBranch Api Branch ($ApiBranch)"
echo " --web Build Web ($WebDir) Branch ($WebBranch)"
echo " --api Build Api ($ApiDir) Branch ($ApiBranch)"
echo " -h Display this help message"
echo
exit 1
@@ -33,9 +31,7 @@ while [[ $# -gt 0 ]]; do
case "$1" in
-v) VERSION="$2"; shift 2 ;;
--web) BuildWeb="build"; shift ;;
-webBranch) WebBranch="$2"; shift 2 ;;
--api) BuildApi="build"; shift ;;
-apiBranch) ApiBranch="$2"; shift 2 ;;
*) usage ;;
esac
done
@@ -47,6 +43,7 @@ git checkout .
git pull
git checkout $BuildBranch
git pull
echo "===> build checkout directory: $BuildDir"
# =================== Web
echo
@@ -58,6 +55,10 @@ if [ -n "$BuildWeb" ]; then
git checkout $WebBranch
git pull
# remote replication
# scpDir=/root/omc.git/fe.ems.vue3
# scp -r -P 18422 root@192.168.9.58:$WebScpDir/dist $WebDir/
# local compilation
npm install --registry https://registry.npmmirror.com
npm run build
@@ -105,8 +106,6 @@ echo
bash $BuildDir/build.sh -v $VERSION
# Compile the front-end and back-end and then package the version
# bash pkg.sh --web -webBranch main --api -apiBranch main -v 2.2503.2
# bash pkg.sh --web --api -v 2.2503.2
# bash pkg.sh --api -apiBranch main -v 2.2503.2
# Packaged version of just the last compiled file/build directory
# bash pkg.sh -v 2.2503.2