Skip to content

Commit

Permalink
changed version name according to opt4j
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasPfeifer committed Mar 15, 2024
1 parent 05e6752 commit 823a026
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,25 @@ java {
}


version = 'SNAPSHOT-' + new Date().format("yyyyMMdd")
/*
* Gets the version name from the latest Git tag
*/
def getVersionName = {
->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags', '--first-parent'
standardOutput = stdout
ignoreExitValue true
}
version=stdout.toString().trim()
if (version.count('-') > 1 || version.isEmpty())
version += '-SNAPSHOT'
if (version.getAt(0) == 'v')
version = version.substring(1)
return version
}
version=getVersionName()

def descriptions = [
'opendse-generator' : 'The test case generator module of OpenDSE',
Expand Down

0 comments on commit 823a026

Please sign in to comment.