Skip to content

Commit

Permalink
Only publish tags to curse
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandoislas committed Jan 31, 2017
1 parent 4112d1b commit 20201ed
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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
}
}
}

Expand Down

0 comments on commit 20201ed

Please sign in to comment.