mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Handle null better
This commit is contained in:
parent
7428998d71
commit
9bcd62937d
1 changed files with 2 additions and 2 deletions
|
@ -81,10 +81,10 @@ configure<BlossomExtension> {
|
|||
val indra = the<IndraGitExtension>()
|
||||
|
||||
val mainFile = "src/main/java/org/geysermc/geyser/GeyserImpl.java"
|
||||
val gitVersion = "git-${indra.branchName()}-${indra.commit()?.name?.substring(0, 7)}"
|
||||
val gitVersion = "git-${indra.branchName() ?: "DEV"}-${indra.commit()?.name?.substring(0, 7) ?: "0000000"}"
|
||||
|
||||
replaceToken("\${version}", "${project.version} ($gitVersion)", mainFile)
|
||||
replaceToken("\${gitVersion}", gitVersion, mainFile)
|
||||
replaceToken("\${buildNumber}", Integer.parseInt(System.getProperty("BUILD_NUMBER", "-1")), mainFile)
|
||||
replaceToken("\${branch}", indra.branchName(), mainFile)
|
||||
replaceToken("\${branch}", indra.branchName() ?: "DEV", mainFile)
|
||||
}
|
Loading…
Reference in a new issue