Skip to content

Commit fc46afb

Browse files
committed
Rework build logic to determine which JDK use for release build
1 parent c15c452 commit fc46afb

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.travis.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ language: scala
22
sudo: false
33
env:
44
global:
5-
- PUBLISH_JDK=openjdk6 # admin/build.sh only publishes when running on this jdk
65
# Don't commit sensitive files, instead commit a version encrypted with $SECRET,
76
# this environment variable is encrypted with this repo's private key and stored below:
87
# (See http://docs.travis-ci.com/user/environment-variables/#Secure-Variables.)
@@ -17,10 +16,15 @@ jdk:
1716
- openjdk6
1817
- oraclejdk8
1918
matrix:
20-
exclude:
21-
22-
- scala: 2.12.0-RC1 # !!! Duplicated above, edit with care
19+
include:
20+
- scala: 2.11.8
2321
jdk: openjdk6
22+
env: IS_PUBLISH_JDK=true
23+
- scala: 2.11.8
24+
jdk: openjdk8
25+
- scala: 2.12.0-RC1
26+
jdk: openjdk8
27+
env: IS_PUBLISH_JDK=true
2428
notifications:
2529
email:
2630

admin/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# git on travis does not fetch tags, but we have TRAVIS_TAG
66
# headTag=$(git describe --exact-match ||:)
77

8-
if [ "$TRAVIS_JDK_VERSION" == "$PUBLISH_JDK" ] && [[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)? ]]; then
8+
if [ "$IS_PUBLISH_JDK" == "true" ] && [[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)? ]]; then
99
echo "Going to release from tag $TRAVIS_TAG!"
1010
myVer=$(echo $TRAVIS_TAG | sed -e s/^v// | sed -e 's/_[0-9]*\.[0-9]*//')
1111
publishVersion='set every version := "'$myVer'"'

0 commit comments

Comments
 (0)