File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -34,10 +34,10 @@ def calcTags(version) {
3434 tags + = " ${ version.major} .${ version.minor} .${ version.rev} .${ version.label} " . toString()
3535 }
3636 // For non-master/non-release builds, change the tags to contain branch and build number
37- def isTestBuild = ci. isCi() && ci. branch != " master " && ci. branch != " release"
38- if (isTestBuild ) {
39- def branch = ci. branch. replace(" /" , " ." ) // slashes are not allowed in docker tags
40- tags = tags. stream(). map({ it + " -build-${ branch} -${ ci.buildNumber} " }). collect(Collectors . toList());
37+ def isReleaseBuild = ci. isCi() && (( ci. branch != null && ( ci. branch. startsWith( " master " ) || ci . branch . startsWith( " release" ))) || ci . tag != null )
38+ if (! isReleaseBuild ) {
39+ def branch = ci. tag ? ci . tag : ci . branch ? ci . branch . replace(" /" , " ." ) : " 1.0.0 "
40+ tags = tags. stream(). map({ it + " -build-${ branch} -${ ci.buildNumber} " }). collect(Collectors . toList())
4141 }
4242
4343 return tags
Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ subprojects {
5656 }
5757
5858 boolean isRelease = ci. branch?. equals(" master" )
59+ || ci. branch?. equals(" release" )
60+ || (ci. tag != null && ci. tag. toLowerCase(). startsWith(" v" ))
5961 if (! isRelease) {
6062 version + = " -SNAPSHOT"
6163 }
@@ -85,6 +87,10 @@ subprojects {
8587 }
8688 }
8789
90+ sourcesJar {
91+ duplicatesStrategy = DuplicatesStrategy . EXCLUDE
92+ }
93+
8894 archivesBaseName = ' xenit-tomcat-embedded'
8995
9096 dockerBuild {
You can’t perform that action at this time.
0 commit comments