mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2025-01-22 00:01:21 +01:00
Fix branch could be empty
This commit is contained in:
parent
51f12741c9
commit
bb9fc876c1
2
api
2
api
@ -1 +1 @@
|
||||
Subproject commit 67a7352c672d054b9e6cd0e996a4fa92ba0c237e
|
||||
Subproject commit 5dc74e299c5553627d33e0ad734f992c01bf2141
|
@ -17,7 +17,7 @@ fun Project.gitVersion(): String {
|
||||
val commits = runCommand("git rev-list --count $lastTag..HEAD", "0")
|
||||
val branch = runCommand("git branch --show-current", "master")
|
||||
val gitVersion = lastVersion +
|
||||
(if (branch == "master") "" else "-${branch.replace('/', '.')}") +
|
||||
(if (branch == "master" || branch.isEmpty()) "" else "-${branch.replace('/', '.')}") +
|
||||
(if (commits == "0") "" else "-$commits") +
|
||||
(if (gitClean()) "" else "-dirty")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user