From d2655c974330f3c32ef090b1c6d0c1d8e4c49838 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Thu, 8 Sep 2016 16:32:57 +1000 Subject: [PATCH] Rework build logic to determine which JDK use for release build --- .travis.yml | 18 ++++++++---------- admin/build.sh | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index df51411d..4141cfbe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ language: scala sudo: false env: global: - - PUBLISH_JDK=openjdk6 # admin/build.sh only publishes when running on this jdk # Don't commit sensitive files, instead commit a version encrypted with $SECRET, # this environment variable is encrypted with this repo's private key and stored below: # (See http://docs.travis-ci.com/user/environment-variables/#Secure-Variables.) @@ -10,17 +9,16 @@ env: script: - admin/build.sh -scala: - - 2.11.8 - - 2.12.0-RC1 # !!! Duplicated below, edit with care -jdk: - - openjdk6 - - oraclejdk8 matrix: - exclude: - - - scala: 2.12.0-RC1 # !!! Duplicated above, edit with care + include: + - scala: 2.11.8 jdk: openjdk6 + env: IS_PUBLISH_JDK=true + - scala: 2.11.8 + jdk: oraclejdk8 + - scala: 2.12.0-RC1 + jdk: oraclejdk8 + env: IS_PUBLISH_JDK=true notifications: email: - jason.zaugg@typesafe.com diff --git a/admin/build.sh b/admin/build.sh index f0692c6c..3257da0d 100755 --- a/admin/build.sh +++ b/admin/build.sh @@ -5,7 +5,7 @@ # git on travis does not fetch tags, but we have TRAVIS_TAG # headTag=$(git describe --exact-match ||:) -if [ "$TRAVIS_JDK_VERSION" == "$PUBLISH_JDK" ] && [[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)? ]]; then +if [ "$IS_PUBLISH_JDK" == "true" ] && [[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)? ]]; then echo "Going to release from tag $TRAVIS_TAG!" myVer=$(echo $TRAVIS_TAG | sed -e s/^v// | sed -e 's/_[0-9]*\.[0-9]*//') publishVersion='set every version := "'$myVer'"'