From 6300d1cc0a060a924a0e49a261f4a85dd9511deb Mon Sep 17 00:00:00 2001 From: John Ferguson Smart Date: Thu, 6 Nov 2014 22:24:22 +1100 Subject: [PATCH] tweaking build number process --- .../builds/ProjectVersionCounter.groovy | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/buildSrc/src/main/groovy/net/thucydides/builds/ProjectVersionCounter.groovy b/buildSrc/src/main/groovy/net/thucydides/builds/ProjectVersionCounter.groovy index 9f7a715..bd132a7 100644 --- a/buildSrc/src/main/groovy/net/thucydides/builds/ProjectVersionCounter.groovy +++ b/buildSrc/src/main/groovy/net/thucydides/builds/ProjectVersionCounter.groovy @@ -7,17 +7,6 @@ class ProjectVersionCounter { this.isRelease = isRelease } - @Override - String toString() { - String fullVersion = "$major.$minor" - if (build) { - fullVersion += ".$build" - } else { - fullVersion += "-SNAPSHOT" - } - fullVersion - } - def getNextVersion() { def currentVersion = "git describe --tags".execute().text if (currentVersion.isEmpty()) { @@ -33,7 +22,8 @@ class ProjectVersionCounter { } def tagNextVersion() { - println "git tag -a $nextVersion -m'release tag'".execute().text - println "git push origin $nextVersion".execute().text + println "Creating a tag in git for $nextVersion" + "git tag -a v$nextVersion -m'release tag'".execute().text + "git push origin --tags".execute().text } }