diff --git a/Dockerfile.linux b/Dockerfile.linux index 161dd2f7..036dd4c6 100644 --- a/Dockerfile.linux +++ b/Dockerfile.linux @@ -1,5 +1,7 @@ FROM bhl-build +ARG BHL_VER_TAG="dev" + # Install build script dependencies RUN add-apt-repository ppa:deadsnakes/ppa RUN apt-get update @@ -19,7 +21,7 @@ WORKDIR /build/bhl COPY . . # Refresh Git index after .git is copied -RUN git update-index --refresh +RUN git update-index -q --refresh RUN python3.8 ./scripts/BuildRelease.py \ --target client \ @@ -27,7 +29,8 @@ RUN python3.8 ./scripts/BuildRelease.py \ --vs 2019 --toolset v141_xp \ --linux-compiler gcc-9 \ --out-dir ./_build_out_client \ - --cmake-args="-DWARNINGS_ARE_ERRORS=ON" + --cmake-args="-DWARNINGS_ARE_ERRORS=ON" \ + --v-tag=${BHL_VER_TAG} RUN python3.8 ./scripts/BuildRelease.py \ --target server \ @@ -35,4 +38,5 @@ RUN python3.8 ./scripts/BuildRelease.py \ --vs 2019 --toolset v141_xp \ --linux-compiler gcc-9 \ --out-dir ./_build_out_server \ - --cmake-args="-DWARNINGS_ARE_ERRORS=ON" + --cmake-args="-DWARNINGS_ARE_ERRORS=ON" \ + --v-tag=${BHL_VER_TAG} diff --git a/Dockerfile.windows b/Dockerfile.windows index 16756912..1ca73570 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -1,11 +1,13 @@ FROM bhl-build +ARG BHL_VER_TAG="dev" + # Build WORKDIR /build/bhl COPY . . # Refresh Git index after .git is copied -RUN git update-index --refresh +RUN git update-index -q --refresh RUN python ./scripts/BuildRelease.py \ --target client \ @@ -13,7 +15,8 @@ RUN python ./scripts/BuildRelease.py \ --vs 2022 --toolset v143 \ --linux-compiler gcc-9 \ --out-dir ./_build_out_client \ - --cmake-args=-DWARNINGS_ARE_ERRORS=ON + --cmake-args=-DWARNINGS_ARE_ERRORS=ON \ + --v-tag=${env:BHL_VER_TAG} RUN python ./scripts/BuildRelease.py \ --target server \ @@ -21,4 +24,5 @@ RUN python ./scripts/BuildRelease.py \ --vs 2022 --toolset v143 \ --linux-compiler gcc-9 \ --out-dir ./_build_out_server \ - --cmake-args=-DWARNINGS_ARE_ERRORS=ON + --cmake-args=-DWARNINGS_ARE_ERRORS=ON \ + --v-tag=${env:BHL_VER_TAG} diff --git a/containers/linux/build-bhl.sh b/containers/linux/build-bhl.sh index 105f3bb8..d1ce6f17 100755 --- a/containers/linux/build-bhl.sh +++ b/containers/linux/build-bhl.sh @@ -12,7 +12,7 @@ OUT_DIR="$CUR_DIR/out/bhl" cd ../.. mkdir -p $OUT_DIR -docker buildx build -f $DOCKERFILE -t $IMAGE_TAG . +docker buildx build -f $DOCKERFILE -t $IMAGE_TAG --build-arg BHL_VER_TAG . docker container create --name $TEMP_CONT $IMAGE_TAG docker container cp ${TEMP_CONT}:/build/bhl/_build_out_client/. $OUT_DIR docker container cp ${TEMP_CONT}:/build/bhl/_build_out_server/. $OUT_DIR diff --git a/containers/windows/build-bhl.ps1 b/containers/windows/build-bhl.ps1 index 6bd52086..03213cf9 100644 --- a/containers/windows/build-bhl.ps1 +++ b/containers/windows/build-bhl.ps1 @@ -11,7 +11,7 @@ cd ../.. rm -r -fo -ea 0 $OutDir mkdir $OutDir -ea 0 -Invoke-Call -ScriptBlock { docker build -f $DockerFile -t $ImageTag . } +Invoke-Call -ScriptBlock { docker build -f $DockerFile -t $ImageTag --build-arg BHL_VER_TAG . } Invoke-Call -ScriptBlock { docker container create --name $TempCont $ImageTag } Invoke-Call -ScriptBlock { docker container cp ${TempCont}:C:/build/bhl/_build_out_client $OutDir } Invoke-Call -ScriptBlock { docker container cp ${TempCont}:C:/build/bhl/_build_out_server $OutDir }