You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by jo...@apache.org on 2020/09/22 02:07:27 UTC

[incubator-dolphinscheduler] branch 1.3.3-release updated: [Fix-3124][docker]Fix that can not build a docker image on windows (#3765)

This is an automated email from the ASF dual-hosted git repository.

journey pushed a commit to branch 1.3.3-release
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git


The following commit(s) were added to refs/heads/1.3.3-release by this push:
     new 09bdd99  [Fix-3124][docker]Fix that can not build a docker image on windows (#3765)
09bdd99 is described below

commit 09bdd99004ee4f311997a82974273569f5a9d678
Author: lgcareer <18...@163.com>
AuthorDate: Tue Sep 22 10:04:26 2020 +0800

    [Fix-3124][docker]Fix that can not build a docker image on windows (#3765)
---
 docker/build/hooks/build.bat | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/docker/build/hooks/build.bat b/docker/build/hooks/build.bat
index fd7c9b5..e810264 100644
--- a/docker/build/hooks/build.bat
+++ b/docker/build/hooks/build.bat
@@ -17,15 +17,20 @@
 
 echo "------ dolphinscheduler start - build -------"
 set
+setlocal enableextensions enabledelayedexpansion
 
 if not defined VERSION (
     echo "set environment variable [VERSION]"
-    for /f %%l in (%cd%\sql\soft_version) do (set VERSION=%%l)
+    set first=1
+    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
+    )
 )
 
 if not defined DOCKER_REPO (
     echo "set environment variable [DOCKER_REPO]"
-    set DOCKER_REPO='dolphinscheduler'
+    set DOCKER_REPO=dolphinscheduler
 )
 
 echo "Version: %VERSION%"
@@ -40,7 +45,7 @@ if "%errorlevel%"=="1" goto :mvnFailed
 
 :: move dolphinscheduler-bin.tar.gz file to docker/build directory
 echo "move %cd%\dolphinscheduler-dist\target\apache-dolphinscheduler-incubating-%VERSION%-SNAPSHOT-dolphinscheduler-bin.tar.gz %cd%\docker\build\"
-move %cd%\dolphinscheduler-dist\target\apache-dolphinscheduler-incubating-%VERSION%-SNAPSHOT-dolphinscheduler-bin.tar.gz %cd%\docker\build\
+move %cd%\dolphinscheduler-dist\target\apache-dolphinscheduler-incubating-%VERSION%-dolphinscheduler-bin.tar.gz %cd%\docker\build\
 
 :: docker build
 echo "docker build --build-arg VERSION=%VERSION% -t %DOCKER_REPO%:%VERSION% %cd%\docker\build\"
@@ -53,4 +58,4 @@ echo "------ dolphinscheduler end - build -------"
 echo "MAVEN PACKAGE FAILED!"
 
 :dockerBuildFailed
-echo "DOCKER BUILD FAILED!"
+echo "DOCKER BUILD FAILED!"
\ No newline at end of file