@@ -10,35 +10,15 @@ set -e
10
10
# sbt-dynver sets the version number from the tag
11
11
# sbt-travisci sets the Scala version from the travis job matrix
12
12
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`)
16
18
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)
18
20
isReleaseJob () {
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
42
22
true
43
23
else
44
24
false
52
32
fi
53
33
54
34
verPat=" [0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)?"
55
- tagPat=" ^v$verPat (#(sjs_)? $verPat )?$"
35
+ tagPat=" ^v$verPat (#.* )?$"
56
36
57
37
if [[ " $TRAVIS_TAG " =~ $tagPat ]]; then
58
38
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
77
42
fi
78
43
fi
79
44
@@ -86,4 +51,4 @@ export CI_SNAPSHOT_RELEASE="$projectPrefix/publish"
86
51
# for now, until we're confident in the new release scripts, just close the staging repo.
87
52
export CI_SONATYPE_RELEASE=" ; sonatypePrepare; sonatypeBundleUpload; sonatypeClose"
88
53
89
- sbt " $setTagScalaVersion " clean $projectPrefix /test $projectPrefix /publishLocal $releaseTask
54
+ sbt clean $projectPrefix /test $projectPrefix /publishLocal $releaseTask
0 commit comments