mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-02-11 11:40:41 +00:00
parsable build number
This commit is contained in:
parent
ea26ec628d
commit
bb44c2ea92
1 changed files with 9 additions and 5 deletions
|
@ -32,12 +32,16 @@ ext {
|
|||
date = git.head().getDate().format("yy.MM.dd")
|
||||
revision = "-${git.head().abbreviatedId}"
|
||||
parents = git.head().parentIds;
|
||||
index = -2039; // Offset to match CI
|
||||
if (project.hasProperty('buildnumber')) {
|
||||
buildNumber = "$buildnumber"
|
||||
} else {
|
||||
index = -2042; // Offset to match CI
|
||||
for (; parents != null && !parents.isEmpty(); index++) {
|
||||
parents = git.getResolve().toCommit(parents.get(0)).getParentIds()
|
||||
}
|
||||
buildNumber = "${index}"
|
||||
}
|
||||
}
|
||||
|
||||
// version = String.format("%s.%s%s%s", rootVersion, date, revision, buildNumber)
|
||||
version = String.format("%s.%s", rootVersion, buildNumber)
|
||||
|
|
Loading…
Reference in a new issue