diff --git a/build.gradle b/build.gradle index 5d7d361..8a62e80 100644 --- a/build.gradle +++ b/build.gradle @@ -13,10 +13,10 @@ buildscript { apply plugin: 'net.minecraftforge.gradle.forge' apply plugin: "com.matthewprenger.cursegradle" -ext.branch = System.getenv('TRAVIS_BRANCH') ext.build = System.getenv('TRAVIS_BUILD_NUMBER') -version = "1.11.2-2.1" -version = (ext.branch != null && ext.branch != "master") ? version + "-dev-" + ext.build : version +ext.tag = System.getenv("TRAVIS_TAG") +version = "1.11.2-2.1.1" +version = version + "-build-T" + ext.build group= "com.rolandoislas.multihotbar" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "multihotbar" @@ -26,13 +26,21 @@ minecraft { mappings = "snapshot_20161220" } -curseforge { - apiKey = System.getenv("CURSE_API_KEY") ?: "" - project { - id = "246054" - changelog = System.getenv("TRAVIS_COMMIT_MESSAGE") ?: "" - releaseType = System.getenv("TRAVIS_TAG") ? "release" : "alpha" - mainArtifact jar +if (ext.tag) { + curseforge { + apiKey = System.getenv("CURSE_API_KEY") ?: "" + ext.tag = System.getenv("TRAVIS_TAG") ?: "" + project { + id = "246054" + changelog = System.getenv("TRAVIS_COMMIT_MESSAGE") ?: "" + if (ext.tag.contains("alpha")) + releaseType = "alpha" + else if (ext.tag.contains("beta")) + releaseType = "beta" + else + releaseType = "release" + mainArtifact jar + } } }