Upgrade build files

This commit is contained in:
NotMyFault 2019-09-04 03:04:51 +02:00
parent e1db27010c
commit 4d0bd8a3a3
3 changed files with 12 additions and 12 deletions

View File

@ -32,11 +32,11 @@ ext {
git = Grgit.open(dir: new File(rootDir.toString() + "/.git")) git = Grgit.open(dir: new File(rootDir.toString() + "/.git"))
date = git.head().getDate().format("yy.MM.dd") date = git.head().getDate().format("yy.MM.dd")
revision = "-${git.head().abbreviatedId}" revision = "-${git.head().abbreviatedId}"
parents = git.head().parentIds; parents = git.head().parentIds
if (project.hasProperty("buildnumber")) { if (project.hasProperty("buildnumber")) {
buildNumber = "$buildnumber" buildNumber = "$buildnumber"
} else { } else {
index = -2042; // Offset to match CI index = -2042 // Offset to match CI
for (; parents != null && !parents.isEmpty(); index++) { for (; parents != null && !parents.isEmpty(); index++) {
parents = git.getResolve().toCommit(parents.get(0)).getParentIds() parents = git.getResolve().toCommit(parents.get(0)).getParentIds()
} }