@@ -10,35 +10,15 @@ set -e
1010# sbt-dynver sets the version number from the tag
1111# sbt-travisci sets the Scala version from the travis job matrix
1212
13- # When a new binary incompatible Scala version becomes available, a previously released version
14- # can be released using that new Scala version by creating a new tag containing the Scala version
15- # after a hash, e.g., v1.2.3#2.13.0-M3.
13+ # To back-publish an existing release for a new Scala / Scala.js / Scala Native version:
14+ # - check out the tag for the version that needs to be published
15+ # - change `.travis.yml` to adjust the version numbers and trim down the build matrix as necessary
16+ # - commit the changes and tag this new revision with an arbitrary suffix after a hash, e.g.,
17+ # `v1.2.3#dotty-0.27` (the suffix is ignored, the version will be `1.2.3`)
1618
17- # For normal tags that are cross-built, we release on JDK 8 for Scala 2.x and Dotty 0.x
19+ # We release on JDK 8 ( for Scala 2.x and Dotty 0.x)
1820isReleaseJob () {
19- if [[ " $ADOPTOPENJDK " == " 8" && " $TRAVIS_SCALA_VERSION " =~ ^2\. 1[234]\. .* $ ]]; then
20- true
21- elif [[ " $ADOPTOPENJDK " == " 8" && " $TRAVIS_SCALA_VERSION " =~ ^0\. [0-9]+\. .* $ ]]; then
22- true
23- else
24- false
25- fi
26- }
27-
28- # For tags that define a Scala version, we pick the jobs of a Scala version (2.13.x) or Dotty (0.x) to do the releases
29- isTagScalaReleaseJob () {
30- if [[ " $ADOPTOPENJDK " == " 8" && " $TRAVIS_SCALA_VERSION " =~ ^2\. 13\. [0-9]+$ ]]; then
31- true
32- elif [[ " $ADOPTOPENJDK " == " 8" && " $TRAVIS_SCALA_VERSION " =~ ^0\. [0-9]+\. .* $ ]]; then
33- true
34- else
35- false
36- fi
37- }
38-
39- # For tags that define a Scala.js version, we pick the jobs of one Scala.js version (1.0.0) to do the releases
40- isTagScalaJsReleaseJob () {
41- if [[ " $ADOPTOPENJDK " == " 8" && " $SCALAJS_VERSION " =~ ^1\. 0\. 0(-[A-Za-z0-9-]+)? $ ]]; then
21+ if [[ " $ADOPTOPENJDK " == " 8" ]]; then
4222 true
4323 else
4424 false
5232fi
5333
5434verPat=" [0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)?"
55- tagPat=" ^v$verPat (#(sjs_)? $verPat )?$"
35+ tagPat=" ^v$verPat (#.* )?$"
5636
5737if [[ " $TRAVIS_TAG " =~ $tagPat ]]; then
5838 releaseTask=" ci-release"
59- tagScalaVer=$( echo $TRAVIS_TAG | sed s/[^# ]*// | sed s/^#//)
60- if [[ " $tagScalaVer " == " " ]]; then
61- if ! isReleaseJob; then
62- echo " Not releasing on Java $ADOPTOPENJDK with Scala $TRAVIS_SCALA_VERSION "
63- exit 0
64- fi
65- elif [[ " $tagScalaVer " == " sjs_$SCALAJS_VERSION " ]]; then
66- if ! isTagScalaJsReleaseJob; then
67- echo " The releases for Scala.js $tagScalaVer are built by other jobs in the travis job matrix"
68- exit 0
69- fi
70- else
71- if isTagScalaReleaseJob; then
72- setTagScalaVersion=' set every scalaVersion := "' $tagScalaVer ' "'
73- else
74- echo " The releases for Scala $tagScalaVer are built by other jobs in the travis job matrix"
75- exit 0
76- fi
39+ if ! isReleaseJob; then
40+ echo " Not releasing on Java $ADOPTOPENJDK with Scala $TRAVIS_SCALA_VERSION "
41+ exit 0
7742 fi
7843fi
7944
@@ -86,4 +51,4 @@ export CI_SNAPSHOT_RELEASE="$projectPrefix/publish"
8651# for now, until we're confident in the new release scripts, just close the staging repo.
8752export CI_SONATYPE_RELEASE=" ; sonatypePrepare; sonatypeBundleUpload; sonatypeClose"
8853
89- sbt " $setTagScalaVersion " clean $projectPrefix /test $projectPrefix /publishLocal $releaseTask
54+ sbt clean $projectPrefix /test $projectPrefix /publishLocal $releaseTask
0 commit comments