perf: 构建工具调整
This commit is contained in:
23
pkg.sh
23
pkg.sh
@@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
# 前端目录
|
||||
WebDir=../web
|
||||
WebDir=/root/omc.git/fe.ems.vue3/
|
||||
BuildWeb=""
|
||||
# 当前目录
|
||||
RootDir=${pwd}
|
||||
RootDir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# 默认版本值
|
||||
VERSION="2.2503.2"
|
||||
|
||||
@@ -34,9 +34,10 @@ if [ -n "$BuildWeb" ]; then
|
||||
cd $WebDir
|
||||
npm install --registry https://registry.npmmirror.com
|
||||
npm run build
|
||||
rm -rf /build/linux/usr/local/etc/omc/web
|
||||
cp -rf dist /build/linux/usr/local/etc/omc/web
|
||||
echo "web build dist copy to /build/linux/usr/local/etc/omc/web"
|
||||
rm -rf $RootDir/build/linux/usr/local/etc/omc/web
|
||||
cp -rf dist/default/config.js dist/config.js
|
||||
cp -rf dist $RootDir/build/linux/usr/local/etc/omc/web
|
||||
echo "===> web build dist copy to /build/linux/usr/local/etc/omc/web"
|
||||
fi
|
||||
|
||||
|
||||
@@ -45,11 +46,11 @@ cd $RootDir
|
||||
|
||||
# ===================
|
||||
echo
|
||||
cd ./sshsvc
|
||||
cd $RootDir/sshsvc
|
||||
make
|
||||
|
||||
cp -rf sshsvc ./build/linux/usr/local/bin/sshsvc
|
||||
echo "go build sshsvc copy to /build/linux/usr/local/bin"
|
||||
cp -rf sshsvc $RootDir/build/linux/usr/local/bin/sshsvc
|
||||
echo "===> go build sshsvc copy to /build/linux/usr/local/bin"
|
||||
|
||||
|
||||
# ===================
|
||||
@@ -57,10 +58,10 @@ echo
|
||||
MOD_CONFIG="be.ems/src/framework/config"
|
||||
go build -o omc -v -ldflags "-s -w -X '$MOD_CONFIG.Version=$VERSION' -X '$MOD_CONFIG.BuildTime=$(date)' -X '$MOD_CONFIG.GoVer=$(go version)'"
|
||||
|
||||
cp -rf omc ./build/linux/usr/local/bin/omc
|
||||
echo "go build omc copy to /build/linux/usr/local/bin"
|
||||
cp -rf omc $RootDir/build/linux/usr/local/bin/omc
|
||||
echo "===> go build omc copy to /build/linux/usr/local/bin"
|
||||
|
||||
|
||||
# ===================
|
||||
echo
|
||||
bash ./build/build.sh -v $VERSION
|
||||
bash $RootDir/build/build.sh -v $VERSION
|
||||
|
||||
Reference in New Issue
Block a user