Skip to content

Commit

Permalink
Fix gradle config cache for Jenkins builds
Browse files Browse the repository at this point in the history
  • Loading branch information
malte0811 committed Sep 15, 2024
1 parent a3c5c80 commit 756902c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,13 @@ String buildVersionString() {
ie_output_version = first_line.substring(first_line.indexOf("-") + 1)
}
// Now use describe to get the number of commits since the last tag
exec {
providers.exec {
commandLine 'git', 'fetch', '-t'
}
def stdout = new ByteArrayOutputStream()
exec {
String descr = providers.exec {
commandLine 'git', 'describe', '--long', '--abbrev=8', 'HEAD'
standardOutput = stdout
}
String descr = stdout.toString().trim()
}.standardOutput.asText.get().trim()
descr = descr.substring(0, descr.length() - 10)
int idx = descr.lastIndexOf("-")
int pre_version = descr.substring(idx + 1).toInteger()
Expand Down

0 comments on commit 756902c

Please sign in to comment.