Skip to content

Commit

Permalink
retrieve the version from git tags
Browse files Browse the repository at this point in the history
  • Loading branch information
d-hrs committed Dec 12, 2023
1 parent 4bf1cf8 commit 303928b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ repositories {
mavenCentral()
}

group = "io.trocco"
version = "0.1.11"
version = {
def vd = versionDetails()
if (vd.commitDistance == 0 && vd.lastTag ==~ /^[0-9]+\.[0-9]+\.[0-9]$/) {
vd.lastTag
} else {
"0.0.0.${vd.gitHash}"
}
}()

sourceCompatibility = 1.8
targetCompatibility = 1.8
Expand Down

0 comments on commit 303928b

Please sign in to comment.