diff --git a/build-docker.sh b/build-docker.sh index 2305cfb..14b5dea 100644 --- a/build-docker.sh +++ b/build-docker.sh @@ -1,7 +1,7 @@ #!/bin/bash # Check if Docker is installed -if command -v docker &> /dev/null then +if command -v docker &> /dev/null; then echo $(docker --version) else echo "Docker is not installed" @@ -149,7 +149,7 @@ echo echo "building omc..." mkdir -p ${BuildDir}/${ReleaseFileName} cp -rf ${BuildPackagelDir}/docker/Dockerfile.${SYSTEM}.${PLATFORM_ARCH} ${BuildDir}/Dockerfile -cp -rf ${BuildPackagelDir}/docker/script/* ${BuildDir}/${ReleaseFileName} +cp -rf ${BuildPackagelDir}/docker/release/* ${BuildDir}/${ReleaseFileName} cp -rf ${BuildLinuxDir} ${BuildDir} app docker_build diff --git a/pkg-copy-front.sh b/pkg-copy-front.sh index 3f6100e..14c5f6c 100644 --- a/pkg-copy-front.sh +++ b/pkg-copy-front.sh @@ -8,6 +8,7 @@ BuildWeb="" ApiBranch=main # Package Catalog BuildDir=/root/omc.git/build.ems +BuildBranch=main # Default Version Value VERSION="2.2503.2" @@ -47,6 +48,11 @@ fi # =================== deb/rpm echo +cd $BuildDir +git checkout . +git pull +git checkout $BuildBranch +git pull bash $BuildDir/pkg.sh --api -apiBranch $ApiBranch -v $VERSION # bash pkg-front.sh --web -v 2.2503.2 diff --git a/pkg-docker.sh b/pkg-docker.sh index 77f0f3a..d506a8c 100644 --- a/pkg-docker.sh +++ b/pkg-docker.sh @@ -8,6 +8,7 @@ ApiDir=/root/omc.git/be.ems ApiBranch=main # Package Catalog BuildDir=/root/omc.git/build.ems +BuildBranch=main BuildTmpDir=/root/omc.git/build.ems/tmp # Default Version Value VERSION="2.2503.2" @@ -50,7 +51,6 @@ cp -rf $WebDir/public $BuildTmpDir/omc_web cp -rf $WebDir/index.html $BuildTmpDir/omc_web cp -rf $WebDir/.env.production $BuildTmpDir/omc_web cp -rf $WebDir/.env.development $BuildTmpDir/omc_web -cp -rf $WebDir/package-lock.json $BuildTmpDir/omc_web cp -rf $WebDir/package.json $BuildTmpDir/omc_web cp -rf $WebDir/tsconfig.json $BuildTmpDir/omc_web cp -rf $WebDir/tsconfig.node.json $BuildTmpDir/omc_web @@ -90,11 +90,15 @@ echo "===> vendor data copy to $output" # =================== build docker image echo +cd $BuildDir +git checkout . +git pull +git checkout $BuildBranch +git pull bash $BuildDir/build-docker.sh --version $VERSION --platform linux/amd64 --system ubuntu22.04 # 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 +# bash pkg-docker.sh -webBranch main -apiBranch main -v 2.2503.2 +# bash pkg-docker.sh -v 2.2503.2 + +bash /root/omc.git/build.ems/build-docker.sh --version 2.2505.2 --platform linux/amd64 --system ubuntu22.04 diff --git a/pkg-remove-chinese.sh b/pkg-remove-chinese.sh index e077340..51ea25c 100644 --- a/pkg-remove-chinese.sh +++ b/pkg-remove-chinese.sh @@ -10,6 +10,7 @@ ApiBranch=lichang BuildApi="" # Package Catalog BuildDir=/root/omc.git/build.ems +BuildBranch=main # Default Version Value VERSION="2.2503.2" @@ -106,6 +107,11 @@ fi # =================== deb/rpm echo +cd $BuildDir +git checkout . +git pull +git checkout $BuildBranch +git pull bash $BuildDir/build.sh -v $VERSION # Compile the front-end and back-end and then package the version diff --git a/pkg.sh b/pkg.sh index 7fcab88..6fbbbb4 100644 --- a/pkg.sh +++ b/pkg.sh @@ -10,6 +10,7 @@ ApiBranch=main BuildApi="" # Package Catalog BuildDir=/root/omc.git/build.ems +BuildBranch=main # Default Version Value VERSION="2.2503.2" @@ -93,6 +94,11 @@ fi # =================== deb/rpm echo +cd $BuildDir +git checkout . +git pull +git checkout $BuildBranch +git pull bash $BuildDir/build.sh -v $VERSION # Compile the front-end and back-end and then package the version diff --git a/pkg/docker/docker/omc-docker.sh b/pkg/docker/release/omc-docker.sh similarity index 100% rename from pkg/docker/docker/omc-docker.sh rename to pkg/docker/release/omc-docker.sh