Merge pull request #2825 from andreykaipov/bugfix/grgit

gradle: catch grgit errors
This commit is contained in:
Owain van Brakel
2020-10-29 17:33:22 +01:00
committed by GitHub

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 {