@@ -10,9 +10,11 @@ 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
19
# For normal tags that are cross-built, we release on JDK 8 for Scala 2.x
18
20
isReleaseJob () {
@@ -23,15 +25,6 @@ isReleaseJob() {
23
25
fi
24
26
}
25
27
26
- # For tags that define a Scala version, we pick the jobs of one Scala version (2.13.x) to do the releases
27
- isTagScalaReleaseJob () {
28
- if [[ " $ADOPTOPENJDK " == " 8" && " $TRAVIS_SCALA_VERSION " =~ ^2\. 13\. [0-9]+$ ]]; then
29
- true
30
- else
31
- false
32
- fi
33
- }
34
-
35
28
if [[ " $SCALAJS_VERSION " != " " ]]; then
36
29
projectPrefix=" parserCombinatorsJS"
37
30
elif [[ " $SCALANATIVE_VERSION " != " " ]]; then
41
34
fi
42
35
43
36
verPat=" [0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)?"
44
- tagPat=" ^v$verPat (#$verPat )?$"
37
+ tagPat=" ^v$verPat (#.* )?$"
45
38
46
39
if [[ " $TRAVIS_TAG " =~ $tagPat ]]; then
47
40
releaseTask=" ci-release"
48
- tagScalaVer=$( echo $TRAVIS_TAG | sed s/[^# ]*// | sed s/^#//)
49
- if [[ " $tagScalaVer " == " " ]]; then
50
- if ! isReleaseJob; then
51
- echo " Not releasing on Java $ADOPTOPENJDK with Scala $TRAVIS_SCALA_VERSION "
52
- exit 0
53
- fi
54
- else
55
- if isTagScalaReleaseJob; then
56
- setTagScalaVersion=' set every scalaVersion := "' $tagScalaVer ' "'
57
- else
58
- echo " The releases for Scala $tagScalaVer are built by other jobs in the travis job matrix"
59
- exit 0
60
- fi
41
+ if ! isReleaseJob; then
42
+ echo " Not releasing on Java $ADOPTOPENJDK with Scala $TRAVIS_SCALA_VERSION "
43
+ exit 0
61
44
fi
62
45
fi
63
46
@@ -70,4 +53,4 @@ export CI_SNAPSHOT_RELEASE="$projectPrefix/publish"
70
53
# for now, until we're confident in the new release scripts, just close the staging repo.
71
54
export CI_SONATYPE_RELEASE=" ; sonatypePrepare; sonatypeBundleUpload; sonatypeClose"
72
55
73
- sbt " $setTagScalaVersion " clean $projectPrefix /test $projectPrefix /publishLocal $releaseTask
56
+ sbt clean $projectPrefix /test $projectPrefix /publishLocal $releaseTask
0 commit comments