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