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