diff --git a/bin/build.sh b/bin/build.sh index 170bf64..f3956f2 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -57,7 +57,7 @@ fi ProjectL=omc ProjectU=OMC PROJECT=${ProjectL} -VERSION={version} +VERSION=2.2508.1 RelDate=`date +%Y%m%d` RelVer=${VERSION}-${RelDate}-mt Ky10Arch=ky10.aarch64 diff --git a/debbuild/22.04/DEBIAN/control b/debbuild/22.04/DEBIAN/control index 68173df..dd44cdb 100644 --- a/debbuild/22.04/DEBIAN/control +++ b/debbuild/22.04/DEBIAN/control @@ -1,5 +1,5 @@ Package: OMC -Version: {version}-YYYYMMDD-mt +Version: 2.2508.1-YYYYMMDD-mt Section: AGrandTech Prioritt: optional Architecture: amd64 diff --git a/debbuild/22.04/DEBIAN/postinst b/debbuild/22.04/DEBIAN/postinst index c3d7bae..ab45138 100755 --- a/debbuild/22.04/DEBIAN/postinst +++ b/debbuild/22.04/DEBIAN/postinst @@ -107,12 +107,12 @@ fi # fi # done -if ! id -u omc >/dev/null 2>&1 ; then - useradd -d /opt/omc -m -s /bin/bash -pomc123 omc; - mkdir -p /opt/omc/ftp -else - echo "user omc exist"; -fi +# if ! id -u omc >/dev/null 2>&1 ; then +# useradd -d /opt/omc -m -s /bin/bash -pomc123 omc; +# mkdir -p /opt/omc/ftp +# else +# echo "user omc exist"; +# fi if [ ! -e "${NginxConfDir}/omc.conf" ]; then mkdir -p ${NginxConfDir} diff --git a/debbuild/DEBIAN/control b/debbuild/DEBIAN/control index 68173df..dd44cdb 100644 --- a/debbuild/DEBIAN/control +++ b/debbuild/DEBIAN/control @@ -1,5 +1,5 @@ Package: OMC -Version: {version}-YYYYMMDD-mt +Version: 2.2508.1-YYYYMMDD-mt Section: AGrandTech Prioritt: optional Architecture: amd64 diff --git a/pkg.sh b/pkg.sh index 793e92c..d8e8e19 100644 --- a/pkg.sh +++ b/pkg.sh @@ -56,6 +56,9 @@ if [ -n "$BuildWeb" ]; then git checkout $WebBranch git pull + sed -i 's/VITE_APP_VERSION = ".*"/VITE_APP_VERSION = "${VERSION}"/' $WebDir/.env.development + sed -i 's/VITE_APP_VERSION = ".*"/VITE_APP_VERSION = "${VERSION}"/' $WebDir/.env.production + cp -rf $BuildDir/customized/ba.d/images/background_light.jpg $WebDir/public/background/light.jpg cp -rf $BuildDir/customized/ba.d/images/background_dark.jpg $WebDir/public/background/dark.jpg cp -rf $BuildDir/customized/ba.d/locales/zh-CN.ts $WebDir/src/i18n/locales/zh-CN.ts @@ -75,6 +78,9 @@ if [ -n "$BuildApi" ]; then git checkout $ApiBranch git pull + sed -i "s/VERSION = .*/VERSION = ${VERSION}/g" $BuildDir/restagent/makefile + sed -i "s/VERSION = .*/VERSION = ${VERSION}/g" $BuildDir/sshsvc/makefile + ProcList="restagent sshsvc" for procName in $ProcList;do cd $ApiDir/$procName @@ -87,11 +93,10 @@ fi # =================== ba deb echo cd $BuildDir -sed -i "s/{version}/${VERSION}/g" $BuildDir/bin/build.sh -sed -i "s/{version}/${VERSION}/g" $BuildDir/bin/makepkg.sh -sed -i "s/{version}/${VERSION}/g" $BuildDir/debbuild/DEBIAN/control -sed -i "s/{version}/${VERSION}/g" $BuildDir/debbuild/22.04/DEBIAN/control -sed -i "s/{version}/${VERSION}/g" $BuildDir/rpmbuild/SPECS/omc.spec +sed -i "s/VERSION=.*/VERSION=${VERSION}/g" $BuildDir/bin/build.sh +sed -i "s/Version: .*/Version: ${VERSION}-YYYYMMDD-mt/g" $BuildDir/debbuild/DEBIAN/control +sed -i "s/Version: .*/Version: ${VERSION}-YYYYMMDD-mt/g" $BuildDir/debbuild/22.04/DEBIAN/control +sed -i "s/Version: .*/Version: ${VERSION}/g" $BuildDir/rpmbuild/SPECS/omc.spec bash bin/build.sh badeb # bash pkg.sh --web --api -v 2.2508.1 diff --git a/rpmbuild/SPECS/omc.spec b/rpmbuild/SPECS/omc.spec index a6afbda..31a051b 100644 --- a/rpmbuild/SPECS/omc.spec +++ b/rpmbuild/SPECS/omc.spec @@ -8,7 +8,7 @@ Name: %{project_lname} Summary: 5GC OMC -Version: {version} +Version: 2.2508.1 Release: %{release_date} Vendor: omc URL: https://www.omc.com/