1
0

fix: 升级时前端config.js覆盖问题

This commit is contained in:
TsMask
2025-04-30 19:08:04 +08:00
parent 1da05f7721
commit 8c94cf6bc0
5 changed files with 5 additions and 9 deletions

View File

@@ -55,9 +55,7 @@ if [ -n "$BuildWeb" ]; then
npm run build
output=$BuildDir/linux/usr/local/etc/omc/web
rm -rf $output
cp -rf dist/default/config.js dist/config.js
cp -rf dist $output
rm -rf $output && cp -rf dist $output
echo "===> web build dist copy to $output"
fi

View File

@@ -41,9 +41,7 @@ if [ -n "$BuildWeb" ]; then
scp -r -P 18422 $ScpWeb:$WebDir/dist $WebDir/
output=$BuildDir/linux/usr/local/etc/omc/web
rm -rf $output
cp -rf dist/default/config.js dist/config.js
cp -rf dist $output
rm -rf $output && cp -rf dist $output
echo "===> web build dist copy to $output"
fi

4
pkg.sh
View File

@@ -53,9 +53,7 @@ if [ -n "$BuildWeb" ]; then
npm run build
output=$BuildDir/linux/usr/local/etc/omc/web
rm -rf $output
cp -rf dist/default/config.js dist/config.js
cp -rf dist $output
rm -rf $output && cp -rf dist $output
echo "===> web build dist copy to $output"
fi

View File

@@ -16,6 +16,7 @@ if [ ! -f $RootDir/omc.conf ]; then
cp $RootDir/default/omc.conf $RootDir/omc.conf
cp $RootDir/default/omc.yaml $RootDir/omc.yaml
cp $RootDir/default/sshsvc.yaml $RootDir/sshsvc.yaml
cp $RootDir/web/default/config.js $RootDir/web/config.js
# read environment parameter and to do
if [ -n "$M_PARAM" ] && [ -n "$C_PARAM" ]; then

View File

@@ -48,6 +48,7 @@ if [ ! -f $RootDir/omc.conf ]; then
cp $RootDir/default/omc.conf $RootDir/omc.conf
cp $RootDir/default/omc.yaml $RootDir/omc.yaml
cp $RootDir/default/sshsvc.yaml $RootDir/sshsvc.yaml
cp $RootDir/web/default/config.js $RootDir/web/config.js
# read environment parameter and to do
if [ -n "$M_PARAM" ] && [ -n "$C_PARAM" ]; then