mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-29 14:06:32 +01:00
Merge branch 'master' of https://github.com/BlueMap-Minecraft/BlueMap
This commit is contained in:
commit
4cbad657d3
@ -28,8 +28,8 @@ fun String.runCommand(): String = ProcessBuilder(split("\\s(?=(?:[^'\"`]*(['\"`]
|
||||
|
||||
val gitHash = "git rev-parse --verify HEAD".runCommand()
|
||||
val clean = "git status --porcelain".runCommand().isEmpty()
|
||||
val lastTag = "git describe --tags --abbrev=0".runCommand()
|
||||
val lastVersion = lastTag.substring(1) // remove the leading 'v'
|
||||
val lastTag = if ("git tag".runCommand().isEmpty()) "" else "git describe --tags --abbrev=0".runCommand()
|
||||
val lastVersion = if (lastTag.isEmpty()) "dev" else lastTag.substring(1) // remove the leading 'v'
|
||||
val commits = "git rev-list --count $lastTag..HEAD".runCommand()
|
||||
println("Git hash: $gitHash" + if (clean) "" else " (dirty)")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user