catch grgit errors

This commit is contained in:
Andrey Kaipov
2020-10-09 18:11:45 -04:00
parent 398d9ff864
commit 15a1e89d8f

View File

@@ -50,8 +50,12 @@ plugins {
application
}
val grgit = Grgit.open(mapOf("dir" to rootProject.projectDir.absolutePath))
val localGitCommit = grgit.head().id
val localGitCommit = try {
val projectPath = rootProject.projectDir.absolutePath
Grgit.open(mapOf("dir" to projectPath)).head().id
} catch (_: Exception) {
"n/a"
}
fun isNonStable(version: String): Boolean {
return listOf("ALPHA", "BETA", "RC").any {