Better automation

This commit is contained in:
Timo Ley 2019-05-25 09:53:45 +02:00
parent 047be59736
commit db6f7164aa
2 changed files with 16 additions and 5 deletions

View file

@ -17,7 +17,17 @@ plugins {
apply plugin: "net.minecraftforge.gradle.forge" apply plugin: "net.minecraftforge.gradle.forge"
version = modVersion
def getVersionName = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags'
standardOutput = stdout
}
return stdout.toString().trim()
}
version = getVersionName()
group = modGroup group = modGroup
archivesBaseName = modBaseName archivesBaseName = modBaseName
@ -95,15 +105,17 @@ processResources {
} }
curseforge { curseforge {
apiKey = "$apiToken" apiKey = apiToken
project { project {
id = "$projectID" id = projectID
changelog = file('changelog.txt') changelog = file('changelog.txt')
releaseType = "beta" releaseType = "beta"
addGameVersion '1.12.2' addGameVersion '1.12.2'
mainArtifact(jar) { mainArtifact(jar) {
displayName = "Infinity Craft $modVersion" displayName = "Infinity Craft $getVersionName"
} }
} }
} }

View file

@ -1,5 +1,4 @@
modGroup=anvil modGroup=anvil
modVersion=1.5
modBaseName=infinity modBaseName=infinity
forgeVersion=1.12.2-14.23.5.2814 forgeVersion=1.12.2-14.23.5.2814
mcpVersion=stable_39 mcpVersion=stable_39