From 47812d2691b3003788bb72b670b3f8ee2b7ec6ef Mon Sep 17 00:00:00 2001 From: Shiwen Cheng Date: Thu, 10 Jun 2021 14:00:28 +0800 Subject: [PATCH] [Fix][Docker] Fix docker image build error (#5613) --- docker/build/hooks/build | 2 +- docker/build/hooks/build.bat | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/build/hooks/build b/docker/build/hooks/build index 78f831799b..0590761eeb 100755 --- a/docker/build/hooks/build +++ b/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 '' -m 1 | awk '{print $1}' | sed 's///' | sed 's/<\/revision>//') + export VERSION=$(cat $(pwd)/pom.xml | grep '' -m 1 | awk '{print $1}' | sed 's///' | sed 's/<\/version>//') fi if [ "${DOCKER_REPO}x" = "x" ] diff --git a/docker/build/hooks/build.bat b/docker/build/hooks/build.bat index bbd4b238ec..d4d538b5dc 100644 --- a/docker/build/hooks/build.bat +++ b/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 "[0-9].*" %cd%\pom.xml') do ( + for /f "tokens=3 delims=<>" %%a in ('findstr "[0-9].*" %cd%\pom.xml') do ( if !first! EQU 1 (set VERSION=%%a) set first=0 )