From 34d2fdae4d0d146fff764f3c14344eabea16232b Mon Sep 17 00:00:00 2001 From: creeper123123321 <7974274+creeper123123321@users.noreply.github.com> Date: Wed, 5 Aug 2020 08:21:54 -0300 Subject: [PATCH] use system env instead of project property --- .travis.yml | 2 +- build.gradle.kts | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e0e30b9..9d27a36 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,4 +22,4 @@ install: true script: # Set up git user name and tag this commit - if [ -z $TRAVIS_TAG ] && [ -z $(git tag -l --points-at HEAD) ]; then git config --local user.name "creeper12313321"; git config --local user.email "7974274+creeper123123321@users.noreply.github.com"; export TRAVIS_TAG=build-$TRAVIS_JOB_NUMBER; git tag $TRAVIS_TAG; fi - - ./gradlew clean build + - ./gradlew diff --git a/build.gradle.kts b/build.gradle.kts index cf1ede2..05cdb60 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -71,10 +71,14 @@ dependencies { include("io.github.cottonmc:cotton-client-commands:1.0.0+1.15.2") } +if (!System.getenv()["curse_api_key"].isNullOrBlank() && branch.startsWith("mc-")) { + defaultTasks("clean", "build", "curseforge") +} else { + defaultTasks("clean", "build") +} + curseforge { - if (project.hasProperty("curse_api_key")) { - apiKey = project.properties["curse_api_key"] - } + apiKey = System.getenv()["curse_api_key"] project(closureOf { id = "391298" changelog = "A changelog can be found at https://github.com/ViaVersion/ViaFabric/commits"