From e4604f6ae9ff521c4c8b364559376f9deb4881ea Mon Sep 17 00:00:00 2001 From: Daniil Smirnov Date: Thu, 9 Feb 2017 18:45:36 +0300 Subject: [PATCH 1/2] Bump scala version --- build.sbt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index d5782ab..c298bfd 100644 --- a/build.sbt +++ b/build.sbt @@ -14,7 +14,7 @@ lazy val commonSettings = scalaModuleSettings ++ Seq( 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") + Seq("2.12.1") else sys.error(s"don't know what Scala versions to build on $java") }, @@ -63,8 +63,8 @@ lazy val library = project settings (scalaModuleOsgiSettings: _*) settings (Mima s"-Jdummy=${pluginJar.value.lastModified}"), libraryDependencies ++= Seq( "org.scala-lang" % "scala-compiler" % scalaVersion.value % "test", - "junit" % "junit" % "4.11" % "test", - "com.novocode" % "junit-interface" % "0.10" % "test"), + "junit" % "junit" % "4.12" % "test", + "com.novocode" % "junit-interface" % "0.11" % "test"), testOptions += Tests.Argument( TestFrameworks.JUnit, s"-Dscala-continuations-plugin.jar=${pluginJar.value.getAbsolutePath}" From ea089caf6803e13e3ad43925cfaa949bbdf42447 Mon Sep 17 00:00:00 2001 From: Daniil Smirnov Date: Thu, 20 Apr 2017 17:15:19 +0300 Subject: [PATCH 2/2] Allow building an existing tag against a new Scala version (same as in https://github.com/scala/scala-swing/commit/69d6acb58f2694e404f5006f3078d9c23722e30e) --- admin/build.sh | 35 +++++++++++++++++++++++++++-------- build.sbt | 2 +- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/admin/build.sh b/admin/build.sh index e4e4690..b66773c 100755 --- a/admin/build.sh +++ b/admin/build.sh @@ -1,14 +1,34 @@ #!/bin/bash -# prep environment for publish to sonatype staging if the HEAD commit is tagged +set -e -# git on travis does not fetch tags, but we have TRAVIS_TAG -# headTag=$(git describe --exact-match ||:) +# Builds of tagged revisions are published to sonatype staging. -if [[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)? ]]; then +# Travis runs a build on new revisions and on new tags, so a tagged revision is built twice. +# Builds for a tag have TRAVIS_TAG defined, which we use for identifying tagged builds. +# Checking the local git clone would not work because git on travis does not fetch tags. + +# The version number to be published is extracted from the tag, e.g., v1.2.3 publishes +# version 1.2.3 using all Scala versions in build.sbt's `crossScalaVersions`. + +# When a new, binary incompatible Scala version becomes available, a previously released version +# can be released using that new Scala version by creating a new tag containing the Scala version +# after a hash, e.g., v1.2.3#2.13.0-M1. + +verPat="[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)?" +tagPat="^v$verPat(#$verPat)?$" + +if [[ "$TRAVIS_TAG" =~ $tagPat ]]; then echo "Going to release from tag $TRAVIS_TAG!" - myVer=$(echo $TRAVIS_TAG | sed -e s/^v//) - publishVersion='set every version := "'$myVer'"' + + tagVer=$(echo $TRAVIS_TAG | sed s/#.*// | sed s/^v//) + publishVersion='set every version := "'$tagVer'"' + + scalaVer=$(echo $TRAVIS_TAG | sed s/[^#]*// | sed s/^#//) + if [ "$scalaVer" != "" ]; then + publishScalaVersion='set every crossScalaVersions := Seq("'$scalaVer'")' + fi + extraTarget="+publish-signed" cat admin/gpg.sbt >> project/plugins.sbt @@ -16,5 +36,4 @@ if [[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)? ]]; then (cd admin/ && ./decrypt.sh secring.asc) fi -# the concurrentRestrictions should prevent spurious test failures, see https://github.com/spray/spray/pull/233 -sbt "$publishVersion" clean update +compile +test +publishLocal $extraTarget \ No newline at end of file +sbt "$publishVersion" "$publishScalaVersion" clean update +test +publishLocal $extraTarget \ No newline at end of file diff --git a/build.sbt b/build.sbt index c298bfd..1b57184 100644 --- a/build.sbt +++ b/build.sbt @@ -14,7 +14,7 @@ lazy val commonSettings = scalaModuleSettings ++ Seq( 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.1") + Seq("2.12.0", "2.12.1") else sys.error(s"don't know what Scala versions to build on $java") },