fix: 更新构建脚本中的分支和版本信息
This commit is contained in:
@@ -29,6 +29,4 @@ cd omc.git && ls
|
|||||||
bash pkg.sh --web --api -v 2.2503.2
|
bash pkg.sh --web --api -v 2.2503.2
|
||||||
# RemoveChinese
|
# RemoveChinese
|
||||||
bash pkg-remove-chinese.sh --web --api -v 2.2503.2
|
bash pkg-remove-chinese.sh --web --api -v 2.2503.2
|
||||||
# Place in upper directory for execution - Remote copy front-end files for packaging
|
|
||||||
bash pkg-copy-front.sh --web -v 2.2503.2
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# front-end Catalog
|
|
||||||
WebDir=/root/omc.git/fe.ems.vue3
|
|
||||||
ScpWeb="root@192.168.9.58"
|
|
||||||
BuildWeb=""
|
|
||||||
# back-end catalog
|
|
||||||
ApiBranch=main
|
|
||||||
# Package Catalog
|
|
||||||
BuildDir=/root/omc.git/build.ems
|
|
||||||
BuildBranch=main
|
|
||||||
# Default Version Value
|
|
||||||
VERSION="2.2503.2"
|
|
||||||
|
|
||||||
# usage
|
|
||||||
usage() {
|
|
||||||
echo "Usage: bash $0 [OPTION]"
|
|
||||||
echo
|
|
||||||
echo "Build Software Package OPTION:"
|
|
||||||
echo " -v Specify the version"
|
|
||||||
echo " --web Build Web ($WebDir)"
|
|
||||||
echo " -h Display this help message"
|
|
||||||
echo
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
# Read command line arguments
|
|
||||||
while [[ $# -gt 0 ]]; do
|
|
||||||
case "$1" in
|
|
||||||
-v) VERSION="$2"; shift 2 ;;
|
|
||||||
--web) BuildWeb="build"; shift ;;
|
|
||||||
*) usage ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# =================== build branch
|
|
||||||
echo
|
|
||||||
cd $BuildDir
|
|
||||||
git checkout .
|
|
||||||
git pull
|
|
||||||
git checkout $BuildBranch
|
|
||||||
git pull
|
|
||||||
|
|
||||||
# =================== Web
|
|
||||||
echo
|
|
||||||
# Determine if --web is passed in
|
|
||||||
if [ -n "$BuildWeb" ]; then
|
|
||||||
cd $WebDir
|
|
||||||
echo "===> web scp dist copy to $WebDir"
|
|
||||||
rm -rf $WebDir/dist
|
|
||||||
scp -r -P 18422 $ScpWeb:$WebDir/dist $WebDir/
|
|
||||||
|
|
||||||
output=$BuildDir/linux/usr/local/etc/omc/web
|
|
||||||
rm -rf $output && cp -rf dist $output
|
|
||||||
echo "===> web build dist copy to $output"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# =================== deb/rpm
|
|
||||||
echo
|
|
||||||
bash $BuildDir/pkg.sh --api -apiBranch $ApiBranch -v $VERSION
|
|
||||||
|
|
||||||
# bash pkg-copy-front.sh --web -v 2.2503.2
|
|
||||||
# bash pkg-copy-front.sh -v 2.2503.2
|
|
||||||
@@ -10,9 +10,9 @@ ApiBranch=lichang
|
|||||||
BuildApi=""
|
BuildApi=""
|
||||||
# Package Catalog
|
# Package Catalog
|
||||||
BuildDir=/root/omc.git/build.ems
|
BuildDir=/root/omc.git/build.ems
|
||||||
BuildBranch=main
|
BuildBranch=lichang
|
||||||
# Default Version Value
|
# Default Version Value
|
||||||
VERSION="2.2503.2"
|
VERSION="2.2505.2"
|
||||||
|
|
||||||
# usage
|
# usage
|
||||||
usage() {
|
usage() {
|
||||||
|
|||||||
25
pkg.sh
25
pkg.sh
@@ -2,17 +2,17 @@
|
|||||||
|
|
||||||
# front-end Catalog
|
# front-end Catalog
|
||||||
WebDir=/root/omc.git/fe.ems.vue3
|
WebDir=/root/omc.git/fe.ems.vue3
|
||||||
WebBranch=main
|
WebBranch=lichang
|
||||||
BuildWeb=""
|
BuildWeb=""
|
||||||
# back-end catalog
|
# back-end Catalog
|
||||||
ApiDir=/root/omc.git/be.ems
|
ApiDir=/root/omc.git/be.ems
|
||||||
ApiBranch=main
|
ApiBranch=lichang
|
||||||
BuildApi=""
|
BuildApi=""
|
||||||
# Package Catalog
|
# Package Catalog
|
||||||
BuildDir=/root/omc.git/build.ems
|
BuildDir=/root/omc.git/build.ems
|
||||||
BuildBranch=main
|
BuildBranch=lichang
|
||||||
# Default Version Value
|
# Default Version Value
|
||||||
VERSION="2.2503.2"
|
VERSION="2.2505.2"
|
||||||
|
|
||||||
# usage
|
# usage
|
||||||
usage() {
|
usage() {
|
||||||
@@ -20,10 +20,8 @@ usage() {
|
|||||||
echo
|
echo
|
||||||
echo "Build Software Package OPTION:"
|
echo "Build Software Package OPTION:"
|
||||||
echo " -v Specify the version"
|
echo " -v Specify the version"
|
||||||
echo " --web Build Web ($WebDir)"
|
echo " --web Build Web ($WebDir) Branch ($WebBranch)"
|
||||||
echo " -webBranch Web Branch ($WebBranch)"
|
echo " --api Build Api ($ApiDir) Branch ($ApiBranch)"
|
||||||
echo " --api Build Api ($ApiDir)"
|
|
||||||
echo " -apiBranch Api Branch ($ApiBranch)"
|
|
||||||
echo " -h Display this help message"
|
echo " -h Display this help message"
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
@@ -33,9 +31,7 @@ while [[ $# -gt 0 ]]; do
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
-v) VERSION="$2"; shift 2 ;;
|
-v) VERSION="$2"; shift 2 ;;
|
||||||
--web) BuildWeb="build"; shift ;;
|
--web) BuildWeb="build"; shift ;;
|
||||||
-webBranch) WebBranch="$2"; shift 2 ;;
|
|
||||||
--api) BuildApi="build"; shift ;;
|
--api) BuildApi="build"; shift ;;
|
||||||
-apiBranch) ApiBranch="$2"; shift 2 ;;
|
|
||||||
*) usage ;;
|
*) usage ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@@ -47,6 +43,7 @@ git checkout .
|
|||||||
git pull
|
git pull
|
||||||
git checkout $BuildBranch
|
git checkout $BuildBranch
|
||||||
git pull
|
git pull
|
||||||
|
echo "===> build checkout directory: $BuildDir"
|
||||||
|
|
||||||
# =================== Web
|
# =================== Web
|
||||||
echo
|
echo
|
||||||
@@ -58,6 +55,10 @@ if [ -n "$BuildWeb" ]; then
|
|||||||
git checkout $WebBranch
|
git checkout $WebBranch
|
||||||
git pull
|
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 install --registry https://registry.npmmirror.com
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
@@ -105,8 +106,6 @@ echo
|
|||||||
bash $BuildDir/build.sh -v $VERSION
|
bash $BuildDir/build.sh -v $VERSION
|
||||||
|
|
||||||
# Compile the front-end and back-end and then package the 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 --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
|
# Packaged version of just the last compiled file/build directory
|
||||||
# bash pkg.sh -v 2.2503.2
|
# bash pkg.sh -v 2.2503.2
|
||||||
|
|||||||
Reference in New Issue
Block a user