From 1ee57b7907d97bb017562b78c036c8d9e4878263 Mon Sep 17 00:00:00 2001 From: Timo Ley Date: Thu, 30 May 2019 00:45:26 +0200 Subject: [PATCH] fixed curse upload for other linux builders --- build.gradle | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 53d6ec1..5ff938d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,3 @@ -import org.apache.tools.ant.taskdefs.condition.Os buildscript { repositories { @@ -32,15 +31,17 @@ def getVersionName = { -> def getAPIKey = { -> def stdout = new ByteArrayOutputStream() - if (Os.isFamily(Os.FAMILY_UNIX)) { + try { exec { commandLine 'cat', '../apiKey' standardOutput = stdout } return stdout.toString().trim() + } catch(Exception e) { + return '0' } - return '0' + } version = getVersionName()