blob: 2f948897e984b66d2577e4a55012e388f6fd06e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
package at.skyhanni.sharedvariables
object SHVersionInfo {
val gitHash by lazy {
val proc = ProcessBuilder("git", "rev-parse", "--short", "HEAD")
.redirectOutput(ProcessBuilder.Redirect.PIPE)
.redirectInput(ProcessBuilder.Redirect.PIPE)
.start()
proc.waitFor()
proc.inputStream.readBytes().decodeToString().trim()
}
}
|