From 9eadcb2e91d3b4143de3448da1e081812ac03b58 Mon Sep 17 00:00:00 2001 From: Juliano Mohr Date: Mon, 10 Feb 2020 20:39:34 +1100 Subject: [PATCH] Minor updates in travis.yml --- .travis.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index cb9c69e..41a694a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,10 @@ +env: + global: + - MAVEN_CMD="mvn --batch-mode --show-version" + +os: + - linux + language: java jdk: @@ -12,31 +19,31 @@ before_install: - openssl aes-256-cbc -K $encrypted_20a9906c1f0d_key -iv $encrypted_20a9906c1f0d_iv -in codesign.asc.enc -out codesign.asc -d - gpg --batch --fast-import codesign.asc - if [ -n "$TRAVIS_TAG" ]; then - mvn versions:set -DnewVersion=$TRAVIS_TAG; + $MAVEN_CMD versions:set -DnewVersion=$TRAVIS_TAG; fi install: - - mvn dependency:go-offline --batch-mode --show-version + - $MAVEN_CMD dependency:go-offline script: - - mvn test --batch-mode --show-version + - $MAVEN_CMD test - if [[ "$TRAVIS_JDK_VERSION" == "openjdk11" ]]; then - mvn clean deploy --batch-mode --show-version --activate-profiles sign --settings settings.xml -DskipTests -Dgpg.passphrase=$GPG_PASSPHRASE; + $MAVEN_CMD clean deploy --activate-profiles sign --settings settings.xml -DskipTests -Dgpg.passphrase=$GPG_PASSPHRASE; fi after_success: - if [[ -n "$TRAVIS_TAG" && "$TRAVIS_JDK_VERSION" == "openjdk11" ]]; then - mvn nexus-staging:release --batch-mode --show-version --settings settings.xml; + $MAVEN_CMD nexus-staging:release --settings settings.xml; fi after_failure: - if [[ -n "$TRAVIS_TAG" && "$TRAVIS_JDK_VERSION" == "openjdk11" ]]; then - mvn nexus-staging:drop --batch-mode --show-version --settings settings.xml; + $MAVEN_CMD nexus-staging:drop --settings settings.xml; fi deploy: provider: releases - api_key: + token: secure: "hdCqWk1eb803aRKc82L3RGaumX8evQJxpR3ZdeDB1LGr/FUimxSDPIZ1e9VcZeW9CtN7HD2UpRZ6g49rQ6mvLA7aA7/r7sEoKMpifByOm7gOl5ZEisK4IzePeqecbomrKXFfjWxB2ubkWAPyx6V4sXi8TP7AG+Nuv3/SmT3mdyg2VuxqrQWpcvv2T9wy2axmLiEL1eKOrdDDtjPR3oZQIAb/3qu8IWwylpaMAQ1FVyjIYBvpwIHyMWZPhuCLW/6VC8omiGn9KsenJ0Ia6haKY4rp8vxq8HOwWjpRec8zEgV+VZ5w+O7wQMZ1xPe4ZwPVyRItaaRPNPonQAkR+U7iOGDYpVNXrvQR8vKP7FTsXLR3LPuWrnl7dyjry94F+Nd5v4R99qMrFrwktWKEzB+iwwSzTw7L9/swtWTYOqy5B8/XjMubh0OtKvYxXd8lFKuBMl6DQhQdU4LEk15sMFdutN62othX7yy8HwfKnE+0TbKFzLL3RwT4SDTXQBLArH5gJco41CR7tXrw7YuymsNtgn2nSBX2F1jGDwVCGWGuVHF3C8c9Zi3k77r11OWcovEisE7peN1Ihcz/iH3+hBuG7BaNeW/0cIISYGIN9Ab7xZW5hs/J7ufPbl1LWWHPSid/9kClW/8drv60U6yWa1TsNeyMEpoSUj8BX11AhDlQCwc=" file_glob: true file: