diff --git a/build.gradle b/build.gradle index 9c98874597c..d9e854fd859 100644 --- a/build.gradle +++ b/build.gradle @@ -759,9 +759,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) {