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

Commit c9aedd8

Browse files
authored
Merge pull request #29 from danslapman/master
[WIP] release for Scala 2.12.1
2 parents 1265443 + ea089ca commit c9aedd8

File tree

2 files changed

+30
-11
lines changed

2 files changed

+30
-11
lines changed

admin/build.sh

+27-8
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,39 @@
11
#!/bin/bash
22

3-
# prep environment for publish to sonatype staging if the HEAD commit is tagged
3+
set -e
44

5-
# git on travis does not fetch tags, but we have TRAVIS_TAG
6-
# headTag=$(git describe --exact-match ||:)
5+
# Builds of tagged revisions are published to sonatype staging.
76

8-
if [[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)? ]]; then
7+
# Travis runs a build on new revisions and on new tags, so a tagged revision is built twice.
8+
# Builds for a tag have TRAVIS_TAG defined, which we use for identifying tagged builds.
9+
# Checking the local git clone would not work because git on travis does not fetch tags.
10+
11+
# The version number to be published is extracted from the tag, e.g., v1.2.3 publishes
12+
# version 1.2.3 using all Scala versions in build.sbt's `crossScalaVersions`.
13+
14+
# When a new, binary incompatible Scala version becomes available, a previously released version
15+
# can be released using that new Scala version by creating a new tag containing the Scala version
16+
# after a hash, e.g., v1.2.3#2.13.0-M1.
17+
18+
verPat="[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)?"
19+
tagPat="^v$verPat(#$verPat)?$"
20+
21+
if [[ "$TRAVIS_TAG" =~ $tagPat ]]; then
922
echo "Going to release from tag $TRAVIS_TAG!"
10-
myVer=$(echo $TRAVIS_TAG | sed -e s/^v//)
11-
publishVersion='set every version := "'$myVer'"'
23+
24+
tagVer=$(echo $TRAVIS_TAG | sed s/#.*// | sed s/^v//)
25+
publishVersion='set every version := "'$tagVer'"'
26+
27+
scalaVer=$(echo $TRAVIS_TAG | sed s/[^#]*// | sed s/^#//)
28+
if [ "$scalaVer" != "" ]; then
29+
publishScalaVersion='set every crossScalaVersions := Seq("'$scalaVer'")'
30+
fi
31+
1232
extraTarget="+publish-signed"
1333
1434
cat admin/gpg.sbt >> project/plugins.sbt
1535
admin/decrypt.sh sensitive.sbt
1636
(cd admin/ && ./decrypt.sh secring.asc)
1737
fi
1838
19-
# the concurrentRestrictions should prevent spurious test failures, see https://github.com/spray/spray/pull/233
20-
sbt "$publishVersion" clean update +compile +test +publishLocal $extraTarget
39+
sbt "$publishVersion" "$publishScalaVersion" clean update +test +publishLocal $extraTarget

build.sbt

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ lazy val commonSettings = scalaModuleSettings ++ Seq(
1414
if (java.startsWith("1.6.") || java.startsWith("1.7."))
1515
Seq("2.11.8")
1616
else if (java.startsWith("1.8.") || java.startsWith("1.9."))
17-
Seq("2.12.0")
17+
Seq("2.12.0", "2.12.1")
1818
else
1919
sys.error(s"don't know what Scala versions to build on $java")
2020
},
@@ -63,8 +63,8 @@ lazy val library = project settings (scalaModuleOsgiSettings: _*) settings (Mima
6363
s"-Jdummy=${pluginJar.value.lastModified}"),
6464
libraryDependencies ++= Seq(
6565
"org.scala-lang" % "scala-compiler" % scalaVersion.value % "test",
66-
"junit" % "junit" % "4.11" % "test",
67-
"com.novocode" % "junit-interface" % "0.10" % "test"),
66+
"junit" % "junit" % "4.12" % "test",
67+
"com.novocode" % "junit-interface" % "0.11" % "test"),
6868
testOptions += Tests.Argument(
6969
TestFrameworks.JUnit,
7070
s"-Dscala-continuations-plugin.jar=${pluginJar.value.getAbsolutePath}"

0 commit comments

Comments
 (0)