Fix manifest docker not skipping interim builds for RCs (#5068)

Signed-off-by: Jason Frame <jason.frame@consensys.net>
pull/5080/head
Jason Frame 2 years ago committed by GitHub
parent b2d378e174
commit 01b16bd900
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      build.gradle

@ -715,10 +715,7 @@ task dockerUpload {
additionalTags.add('develop')
}
def isInterimBuild = (dockerBuildVersion ==~ /.*-SNAPSHOT/) || (dockerBuildVersion ==~ /.*-alpha/)
|| (dockerBuildVersion ==~ /.*-beta/) || (dockerBuildVersion ==~ /.*-RC.*/)
if (!isInterimBuild) {
if (!isInterimBuild(dockerBuildVersion)) {
additionalTags.add(dockerBuildVersion.split(/\./)[0..1].join('.'))
}
@ -778,7 +775,7 @@ task manifestDocker {
tags.add("${dockerImageName}:develop")
}
if (!(dockerBuildVersion ==~ /.*-SNAPSHOT/)) {
if (!isInterimBuild(dockerBuildVersion)) {
tags.add("${dockerImageName}:" + dockerBuildVersion.split(/\./)[0..1].join('.'))
}
@ -929,6 +926,12 @@ def getCheckedOutGitCommitHash(length = 8) {
}
}
// Takes the version and if it contains SNAPSHOT, alpha, beta or RC in version then return true indicating an interim build
def isInterimBuild(dockerBuildVersion) {
return (dockerBuildVersion ==~ /.*-SNAPSHOT/) || (dockerBuildVersion ==~ /.*-alpha/)
|| (dockerBuildVersion ==~ /.*-beta/) || (dockerBuildVersion ==~ /.*-RC.*/)
}
tasks.register("verifyDistributions") {
dependsOn distTar
dependsOn distZip

Loading…
Cancel
Save