Skip to content

Commit

Permalink
Fixed unit test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
kpiot123 committed Jan 20, 2025
1 parent 7ecc9e4 commit 59ca606
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ def calcTags(version) {
tags += "${version.major}.${version.minor}.${version.rev}.${version.label}".toString()
}
// For non-master/non-release builds, change the tags to contain branch and build number
def isTestBuild = ci.isCi() && ci.branch != "master" && ci.branch != "release"
if (isTestBuild) {
def branch = ci.branch.replace("/", ".") //slashes are not allowed in docker tags
tags = tags.stream().map({ it + "-build-${branch}-${ci.buildNumber}" }).collect(Collectors.toList());
def isReleaseBuild = ci.isCi() && (ci.branch.startsWith("master") || ci.branch.startsWith("release") || ci.tag != null)
System.out.println("ci branch: " + ci.branch)
System.out.println("ci tag: " + ci.tag)
if (!isReleaseBuild) {
def branch = ci.tag ? ci.tag : ci.branch.replace("/", ".")
tags = tags.stream().map({ it + "-build-${branch}-${ci.buildNumber}" }).collect(Collectors.toList())
}

return tags
Expand Down

0 comments on commit 59ca606

Please # to comment.