Catch git exec errors during build
@@ -80,6 +80,7 @@ configurations {
// sets version to the slimeKnights version format
task buildInfo {
+ try {
def cmd = "git rev-parse --short HEAD"
def proc = cmd.execute()
proc.waitFor()
@@ -88,6 +89,9 @@ task buildInfo {
} else {
ext.revision = "GITBORK"
}
+ } catch(all) {
+ ext.revision = "gitgud"
+ }
if (System.getenv().BUILD_NUMBER != null) {
ext.buildNum = "${System.getenv().BUILD_NUMBER}"
