fixed curse upload

This commit is contained in:
Timo Ley 2019-05-29 16:01:49 +02:00
parent 0092783f11
commit c22fadbf85

View file

@ -1,4 +1,4 @@
import org.apache.tools.ant.filters.ReplaceTokens import org.apache.tools.ant.taskdefs.condition.Os
buildscript { buildscript {
repositories { repositories {
@ -32,20 +32,20 @@ def getVersionName = { ->
def getAPIKey = { -> def getAPIKey = { ->
def stdout = new ByteArrayOutputStream() def stdout = new ByteArrayOutputStream()
if (Os.isFamily(Os.FAAMILY_LINUX)) { if (Os.isFamily(Os.FAMILY_UNIX)) {
exec { exec {
commandLine 'cat', '../apiKey' commandLine 'cat', '../apiKey'
standardOutput = stdout standardOutput = stdout
} }
return stdout.toString().trim() return stdout.toString().trim()
} }
return "0";
return '0'
} }
version = getVersionName() version = getVersionName()
group = modGroup group = modGroup
archivesBaseName = modBaseName archivesBaseName = modBaseName
def apiToken = getAPIKey
minecraft { minecraft {
version = project.forgeVersion version = project.forgeVersion
@ -63,6 +63,7 @@ minecraft {
} }
repositories { repositories {
mavenCentral() mavenCentral()
maven { maven {
@ -131,7 +132,7 @@ processResources {
} }
curseforge { curseforge {
apiKey = apiToken apiKey = getApiKey()
project { project {
id = projectID id = projectID
changelog = file('changelog.txt') changelog = file('changelog.txt')