Skip to content

Rework build logic to determine which JDK use for release build #161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,23 @@ 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.)
- secure: "YO/7YiWEirzz0EAy7oVNmAKroj4qCLZNMkPS+xW/VgeGjuEV+Nk1S7pwxF0o2OggSxIQ+a0lWSrOPQqSXMjOstDIzzGeYfuAt0+0fupXtDDge0mXpCCMadrvYzff1/5XYX0dJ+pjJmz6IgF1hliPJHIuddhhdqPxdHWTHAKm9ME="

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:
- [email protected]
Expand Down
2 changes: 1 addition & 1 deletion admin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'"'
Expand Down