Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-20 06:50:09 +01:00
Fix git branch on Jenkins (#3286)
Dieser Commit ist enthalten in:
Ursprung
83be01958f
Commit
0aa7411d02
@ -79,7 +79,8 @@ configure<BlossomExtension> {
|
|||||||
val indra = the<IndraGitExtension>()
|
val indra = the<IndraGitExtension>()
|
||||||
|
|
||||||
val mainFile = "src/main/java/org/geysermc/geyser/GeyserImpl.java"
|
val mainFile = "src/main/java/org/geysermc/geyser/GeyserImpl.java"
|
||||||
val branchName = indra.branchName() ?: "DEV"
|
// On Jenkins, a detached head is checked out, so indra cannot determine the branch. Fortunately, this environment variable is available.
|
||||||
|
val branchName = indra.branchName() ?: System.getenv("GIT_BRANCH") ?: "DEV"
|
||||||
val commit = indra.commit()
|
val commit = indra.commit()
|
||||||
val git = indra.git()
|
val git = indra.git()
|
||||||
val gitVersion = "git-${branchName}-${commit?.name?.substring(0, 7) ?: "0000000"}"
|
val gitVersion = "git-${branchName}-${commit?.name?.substring(0, 7) ?: "0000000"}"
|
||||||
@ -93,4 +94,4 @@ configure<BlossomExtension> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun Project.buildNumber(): Int =
|
fun Project.buildNumber(): Int =
|
||||||
Integer.parseInt(System.getenv("BUILD_NUMBER") ?: "-1")
|
Integer.parseInt(System.getenv("BUILD_NUMBER") ?: "-1")
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren