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

Commit 6106800

Browse files
authored
Merge pull request #22 from danslapman/master
redo how crossScalaVersions works
2 parents 53ce604 + 7995a5b commit 6106800

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

.travis.yml

+3-11
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

admin/build.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
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'"'
12-
extraTarget="publish-signed"
12+
extraTarget="+publish-signed"
1313

1414
cat admin/gpg.sbt >> project/plugins.sbt
1515
admin/decrypt.sh sensitive.sbt
1616
(cd admin/ && ./decrypt.sh secring.asc)
1717
fi
1818

1919
# the concurrentRestrictions should prevent spurious test failures, see https://github.com/spray/spray/pull/233
20-
sbt ++$TRAVIS_SCALA_VERSION 'set concurrentRestrictions in Global += Tags.limit(Tags.Test, 1)' "$publishVersion" clean update compile test $extraTarget
20+
sbt "$publishVersion" clean update +compile +test +publishLocal $extraTarget

build.sbt

+10-2
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)