Browse Source

[Fix][Docker] Fix docker image build error (#5613)

2.0.7-release
Shiwen Cheng 3 years ago committed by CalvinKirs
parent
commit
47812d2691
  1. 2
      docker/build/hooks/build
  2. 2
      docker/build/hooks/build.bat

2
docker/build/hooks/build

@ -24,7 +24,7 @@ printenv
if [ -z "${VERSION}" ]
then
echo "set default environment variable [VERSION]"
export VERSION=$(cat $(pwd)/pom.xml | grep '<revision>' -m 1 | awk '{print $1}' | sed 's/<revision>//' | sed 's/<\/revision>//')
export VERSION=$(cat $(pwd)/pom.xml | grep '<version>' -m 1 | awk '{print $1}' | sed 's/<version>//' | sed 's/<\/version>//')
fi
if [ "${DOCKER_REPO}x" = "x" ]

2
docker/build/hooks/build.bat

@ -22,7 +22,7 @@ setlocal enableextensions enabledelayedexpansion
if not defined VERSION (
echo "set environment variable [VERSION]"
set first=1
for /f "tokens=3 delims=<>" %%a in ('findstr "<revision>[0-9].*</revision>" %cd%\pom.xml') do (
for /f "tokens=3 delims=<>" %%a in ('findstr "<version>[0-9].*</version>" %cd%\pom.xml') do (
if !first! EQU 1 (set VERSION=%%a)
set first=0
)

Loading…
Cancel
Save