mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Fix git branch on Jenkins (#3286)
This commit is contained in:
parent
83be01958f
commit
0aa7411d02
1 changed files with 3 additions and 2 deletions
|
@ -79,7 +79,8 @@ configure<BlossomExtension> {
|
|||
val indra = the<IndraGitExtension>()
|
||||
|
||||
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 git = indra.git()
|
||||
val gitVersion = "git-${branchName}-${commit?.name?.substring(0, 7) ?: "0000000"}"
|
||||
|
|
Loading…
Reference in a new issue