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

redo how crossScalaVersions works #22

Merged
merged 2 commits into from
Oct 13, 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
14 changes: 3 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ language: scala

env:
global:
- PUBLISH_JDK=openjdk8 # 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.)
# 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: "apmuVagS7WgWzg9HeDLCcX4INxazi50qukOfPkvluJjm58RCJsDwaZseXrQGqyPzRKuBnAetJ4NDWbZMRkm6QpTiH8grPwDl6iNUSVivvzOZGl3Iy8LvNxUv6CYoQBG+R7d8dW//1xcoHtT2zYo3dYEFpSelfNMMLADNUKXSQmI="

before_install:
Expand All @@ -14,16 +13,9 @@ before_install:
- sudo mv /tmp/hosts /etc/hosts
script:
- admin/build.sh
scala:
- 2.11.8
- 2.12.0-RC1
jdk:
- openjdk6
- oraclejdk8
matrix:
exclude:
- scala: 2.12.0-RC1
jdk: openjdk6
notifications:
email:
- [email protected]
Expand Down
6 changes: 3 additions & 3 deletions admin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
# 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 [[ "$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//)
publishVersion='set every version := "'$myVer'"'
extraTarget="publish-signed"
extraTarget="+publish-signed"

cat admin/gpg.sbt >> project/plugins.sbt
admin/decrypt.sh sensitive.sbt
(cd admin/ && ./decrypt.sh secring.asc)
fi

# the concurrentRestrictions should prevent spurious test failures, see https://github.com/spray/spray/pull/233
sbt ++$TRAVIS_SCALA_VERSION 'set concurrentRestrictions in Global += Tags.limit(Tags.Test, 1)' "$publishVersion" clean update compile test $extraTarget
sbt "$publishVersion" clean update +compile +test +publishLocal $extraTarget
12 changes: 10 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,16 @@ lazy val commonSettings = scalaModuleSettings ++ Seq(
repoName := "scala-continuations",
organization := "org.scala-lang.plugins",
version := "1.0.3-SNAPSHOT",
scalaVersion := "2.11.8",
crossScalaVersions := Seq("2.11.8", "2.12.0-RC1"),
scalaVersion := crossScalaVersions.value.head,
crossScalaVersions := {
val java = System.getProperty("java.version")
if (java.startsWith("1.6.") || java.startsWith("1.7."))
Seq("2.11.8")
else if (java.startsWith("1.8.") || java.startsWith("1.9."))
Seq("2.12.0-RC1")
else
sys.error(s"don't know what Scala versions to build on $java")
},
snapshotScalaBinaryVersion := "2.11.8",
scalacOptions ++= Seq(
"-deprecation",
Expand Down