diff --git a/build.gradle b/build.gradle index 2cb03d21b1..356b931a4e 100644 --- a/build.gradle +++ b/build.gradle @@ -86,12 +86,10 @@ if (project.hasProperty('iets3OpenSourceVersion')) { def buildNumber = System.env.BUILD_NUMBER.toInteger() if (currentBranch.startsWith("maintenance-")) { version = "$major.$minor.$buildNumber.${GitBasedVersioning.gitShortCommitHash}" - } else if (currentBranch.startsWith("datev-loon-staging-") || currentBranch.startsWith("datev-steuer-staging-")){ - // branch name will be part of the version - version = GitBasedVersioning.getVersionWithCount(major, minor, buildNumber) } else { - version = GitBasedVersioning.getVersionWithCount(major, minor, buildNumber) + "-SNAPSHOT" - } + def isSnapshot = !(currentBranch.equals("master") || currentBranch.startsWith("datev-loon-staging-") || currentBranch.startsWith("datev-steuer-staging-")) + version = GitBasedVersioning.getVersionWithCount(major, minor, buildNumber) + (isSnapshot ? "-SNAPSHOT" : "") + } println "##teamcity[buildNumber '${version}']" } else { version = "$major.$minor-SNAPSHOT"