From b4a9d46db5554a3ce4a8389fdabc414ee95291ac Mon Sep 17 00:00:00 2001 From: Daniil Smirnov Date: Fri, 14 Oct 2016 00:08:10 +0300 Subject: [PATCH 1/2] redo how crossScalaVersions works based on https://github.com/scala/scala-xml/commit/38fbbbeeff6bc97c4438e3e37041894c93538e46 --- .travis.yml | 14 +++----------- admin/build.sh | 2 +- build.sbt | 12 ++++++++++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 867fb33..169287c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: @@ -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: - adriaan.moors@lightbend.com diff --git a/admin/build.sh b/admin/build.sh index e759375..b203a76 100755 --- a/admin/build.sh +++ b/admin/build.sh @@ -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 [[ "$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'"' diff --git a/build.sbt b/build.sbt index 79307fb..74b312c 100644 --- a/build.sbt +++ b/build.sbt @@ -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", From 7995a5b9020bd01ffc2ee728557b39758fbdfa67 Mon Sep 17 00:00:00 2001 From: Daniil Smirnov Date: Fri, 14 Oct 2016 00:23:07 +0300 Subject: [PATCH 2/2] build.sh didn't use cross versions of sbt targets --- admin/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/build.sh b/admin/build.sh index b203a76..e4e4690 100755 --- a/admin/build.sh +++ b/admin/build.sh @@ -9,7 +9,7 @@ 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 @@ -17,4 +17,4 @@ if [[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)? ]]; then 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 \ No newline at end of file +sbt "$publishVersion" clean update +compile +test +publishLocal $extraTarget \ No newline at end of file