aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--it/pom.xml6
1 files changed, 5 insertions, 1 deletions
diff --git a/it/pom.xml b/it/pom.xml
index 4e3e090..0eefad7 100644
--- a/it/pom.xml
+++ b/it/pom.xml
@@ -108,7 +108,11 @@
String pom = new File(project.basedir, '../pom.xml').getText('UTF-8')
def matcher = pom =~ /(?s).*<version>(.*?)-SNAPSHOT<\/version>.*/
assert matcher.matches()
- project.properties['scanner.version'] = matcher[0][1] + '.0.' + System.getenv()['CI_BUILD_NUMBER']
+ def versionNoSnapshot = matcher[0][1]
+ if (new StringTokenizer(versionNoSnapshot, ".").countTokens() == 2) {
+ versionNoSnapshot += '.0'
+ }
+ project.properties['scanner.version'] = versionNoSnapshot + '.' + System.getenv()['CI_BUILD_NUMBER']
]]>
</source>
</configuration>