mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00:00
force version
This commit is contained in:
parent
59f8f2fdff
commit
84108b60c2
1 changed files with 1 additions and 23 deletions
24
build.gradle
24
build.gradle
|
@ -1,5 +1,3 @@
|
|||
import org.ajoberstar.grgit.Grgit
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
@ -25,27 +23,7 @@ plugins {
|
|||
|
||||
group = "com.plotsquared"
|
||||
|
||||
def rootVersion = "5"
|
||||
def revision = ""
|
||||
def buildNumber = ""
|
||||
def date = ""
|
||||
ext {
|
||||
git = Grgit.open(dir: new File(rootDir.toString() + "/.git"))
|
||||
date = git.head().getDate().format("yy.MM.dd")
|
||||
revision = "-${git.head().abbreviatedId}"
|
||||
parents = git.head().parentIds
|
||||
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", rootVersion, buildNumber)
|
||||
version = "5.10.0"
|
||||
|
||||
description = rootProject.name
|
||||
|
||||
|
|
Loading…
Reference in a new issue