From f7818467c12aa86d74ee7ab680cf58eae6465273 Mon Sep 17 00:00:00 2001 From: Andrew Davis <1709934+Savid@users.noreply.github.com> Date: Sat, 16 Mar 2024 02:14:09 +1000 Subject: [PATCH] fix(build): docker git ref Signed-off-by: Andrew Davis <1709934+Savid@users.noreply.github.com> --- build.gradle | 3 ++- ethereum/evmtool/build.gradle | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 17d2d317ffd..d499ffdf08d 100644 --- a/build.gradle +++ b/build.gradle @@ -766,9 +766,10 @@ task distDocker { dockerPlatform = "--platform ${project.getProperty('docker-platform')}" println "Building for platform ${project.getProperty('docker-platform')}" } + def gitDetails = getGitCommitDetails(10) executable "sh" workingDir dockerBuildDir - args "-c", "docker build ${dockerPlatform} --build-arg BUILD_DATE=${buildTime()} --build-arg VERSION=${dockerBuildVersion} --build-arg VCS_REF=${getCheckedOutGitCommitHash()} -t ${image} ." + args "-c", "docker build ${dockerPlatform} --build-arg BUILD_DATE=${buildTime()} --build-arg VERSION=${dockerBuildVersion} --build-arg VCS_REF=${gitDetails.hash} -t ${image} ." } } diff --git a/ethereum/evmtool/build.gradle b/ethereum/evmtool/build.gradle index 5bc7877fc28..db582bcb02f 100644 --- a/ethereum/evmtool/build.gradle +++ b/ethereum/evmtool/build.gradle @@ -120,8 +120,9 @@ tasks.register('distDocker', Exec) { } } + def gitDetails = getGitCommitDetails(10) executable "sh" - args "-c", "docker build --build-arg BUILD_DATE=${buildTime()} --build-arg VERSION=${dockerBuildVersion} --build-arg VCS_REF=${getCheckedOutGitCommitHash()} -t ${image} ." + args "-c", "docker build --build-arg BUILD_DATE=${buildTime()} --build-arg VERSION=${dockerBuildVersion} --build-arg VCS_REF=${gitDetails.hash} -t ${image} ." } tasks.register('dockerUpload', Exec) {