Skip to content
This repository was archived by the owner on Jun 23, 2020. It is now read-only.

Commit b4a9d46

Browse files
committed
redo how crossScalaVersions works
based on scala/scala-xml@38fbbbe
1 parent 41716d7 commit b4a9d46

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

.travis.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ language: scala
22

33
env:
44
global:
5-
- PUBLISH_JDK=openjdk8 # admin/build.sh only publishes when running on this jdk
6-
# Don't commit sensitive files, instead commit a version encrypted with $SECRET,
7-
# this environment variable is encrypted with this repo's private key and stored below:
8-
# (See http://docs.travis-ci.com/user/environment-variables/#Secure-Variables.)
5+
# Don't commit sensitive files, instead commit a version encrypted with $SECRET,
6+
# this environment variable is encrypted with this repo's private key and stored below:
7+
# (See http://docs.travis-ci.com/user/environment-variables/#Secure-Variables.)
98
- secure: "apmuVagS7WgWzg9HeDLCcX4INxazi50qukOfPkvluJjm58RCJsDwaZseXrQGqyPzRKuBnAetJ4NDWbZMRkm6QpTiH8grPwDl6iNUSVivvzOZGl3Iy8LvNxUv6CYoQBG+R7d8dW//1xcoHtT2zYo3dYEFpSelfNMMLADNUKXSQmI="
109

1110
before_install:
@@ -14,16 +13,9 @@ before_install:
1413
- sudo mv /tmp/hosts /etc/hosts
1514
script:
1615
- admin/build.sh
17-
scala:
18-
- 2.11.8
19-
- 2.12.0-RC1
2016
jdk:
2117
- openjdk6
2218
- oraclejdk8
23-
matrix:
24-
exclude:
25-
- scala: 2.12.0-RC1
26-
jdk: openjdk6
2719
notifications:
2820
email:
2921
- adriaan.moors@lightbend.com

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 [[ "$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//)
1111
publishVersion='set every version := "'$myVer'"'

build.sbt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,16 @@ lazy val commonSettings = scalaModuleSettings ++ Seq(
88
repoName := "scala-continuations",
99
organization := "org.scala-lang.plugins",
1010
version := "1.0.3-SNAPSHOT",
11-
scalaVersion := "2.11.8",
12-
crossScalaVersions := Seq("2.11.8", "2.12.0-RC1"),
11+
scalaVersion := crossScalaVersions.value.head,
12+
crossScalaVersions := {
13+
val java = System.getProperty("java.version")
14+
if (java.startsWith("1.6.") || java.startsWith("1.7."))
15+
Seq("2.11.8")
16+
else if (java.startsWith("1.8.") || java.startsWith("1.9."))
17+
Seq("2.12.0-RC1")
18+
else
19+
sys.error(s"don't know what Scala versions to build on $java")
20+
},
1321
snapshotScalaBinaryVersion := "2.11.8",
1422
scalacOptions ++= Seq(
1523
"-deprecation",

0 commit comments

Comments
 (0)