@@ -10,56 +10,41 @@ 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
19
+ # We release on JDK 8 ( for Scala 2.x and 3.x).
18
20
isReleaseJob () {
19
- if [[ " $ADOPTOPENJDK " == " 8" && " $TRAVIS_SCALA_VERSION " =~ ^2 \. 1[34] \. . * $ ]]; then
21
+ if [[ " $ADOPTOPENJDK " == " 8" ]]; then
20
22
true
21
23
else
22
24
false
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
- }
28
+ projectPrefix=" "
34
29
35
30
verPat=" [0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)?"
36
- tagPat=" ^v$verPat (#$verPat )?$"
31
+ tagPat=" ^v$verPat (#.* )?$"
37
32
38
33
if [[ " $TRAVIS_TAG " =~ $tagPat ]]; then
39
34
releaseTask=" ci-release"
40
- tagScalaVer=$( echo $TRAVIS_TAG | sed s/[^# ]*// | sed s/^#//)
41
- if [[ " $tagScalaVer " == " " ]]; then
42
- if ! isReleaseJob; then
43
- echo " Not releasing on Java $ADOPTOPENJDK with Scala $TRAVIS_SCALA_VERSION "
44
- exit 0
45
- fi
46
- else
47
- if isTagScalaReleaseJob; then
48
- setTagScalaVersion=' set every scalaVersion := "' $tagScalaVer ' "'
49
- else
50
- echo " The releases for Scala $tagScalaVer are built by other jobs in the travis job matrix"
51
- exit 0
52
- fi
35
+ if ! isReleaseJob; then
36
+ echo " Not releasing on Java $ADOPTOPENJDK with Scala $TRAVIS_SCALA_VERSION "
37
+ exit 0
53
38
fi
54
39
fi
55
40
56
41
# default is +publishSigned; we cross-build with travis jobs, not sbt's crossScalaVersions
57
- export CI_RELEASE= " publishSigned"
58
- export CI_SNAPSHOT_RELEASE= " publish"
42
+ export CI_RELEASE=" ${projectPrefix} publishSigned"
43
+ export CI_SNAPSHOT_RELEASE=" ${projectPrefix} publish"
59
44
60
45
# default is sonatypeBundleRelease, which closes and releases the staging repo
61
46
# see https://github.com/xerial/sbt-sonatype#commands
62
47
# for now, until we're confident in the new release scripts, just close the staging repo.
63
48
export CI_SONATYPE_RELEASE=" ; sonatypePrepare; sonatypeBundleUpload; sonatypeClose"
64
49
65
- sbt " $setTagScalaVersion " clean test core/headerCheck publishLocal $releaseTask
50
+ sbt clean ${projectPrefix} test core/headerCheck ${projectPrefix} publishLocal $releaseTask
0 commit comments