Add git version
This commit is contained in:
1 parent
a263f400e3
commit
b7c6b903e0
2 files changed
+13
-13
No files matched your search
@@ -1,5 +1,3 @@
|
||||
import java.io.ByteArrayOutputStream
|
||||
|
||||
plugins {
|
||||
id("java")
|
||||
id("com.github.johnrengelman.shadow") version "7.1.0"
|
||||
@@ -48,13 +46,3 @@ publishing {
|
||||
dependencies {
|
||||
compileOnly("com.alttd:Galaxy-API:1.19.2-R0.1-SNAPSHOT")
|
||||
}
|
||||
|
||||
fun gitCommit(): String {
|
||||
val os = ByteArrayOutputStream()
|
||||
project.exec {
|
||||
isIgnoreExitValue = true
|
||||
commandLine = "git rev-parse --short HEAD".split(" ")
|
||||
standardOutput = os
|
||||
}
|
||||
return String(os.toByteArray()).trim()
|
||||
}
|
||||
Reference in new issue
Block a user