1414# - check out the tag for the version that needs to be published
1515# - change `.travis.yml` to adjust the version numbers and trim down the build matrix as necessary
1616# - commit the changes and tag this new revision with an arbitrary suffix after a hash, e.g.,
17- # `v1.2.3#3.0.0-M2 ` (the suffix is ignored, the version will be `1.2.3`)
17+ # `v1.2.3#dotty-0.27 ` (the suffix is ignored, the version will be `1.2.3`)
1818
1919# We release on JDK 8 (for Scala 2.x and 3.x)
2020isReleaseJob () {
@@ -25,39 +25,20 @@ isReleaseJob() {
2525 fi
2626}
2727
28- # For tags that define a Scala version, we pick the jobs of one Scala version (2.13.x) to do the releases
29- isTagScalaReleaseJob () {
30- if [[ " $ADOPTOPENJDK " == " 8" && " $TRAVIS_SCALA_VERSION " =~ ^2\. 13\. [0-9]+$ ]]; then
31- true
32- else
33- false
34- fi
35- }
36-
3728if [[ " $SCALAJS_VERSION " == " " ]]; then
3829 projectPrefix=" swing/"
3930else
4031 projectPrefix=" swingJS/"
4132fi
4233
4334verPat=" [0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)?"
44- tagPat=" ^v$verPat (#$verPat )?$"
35+ tagPat=" ^v$verPat (#.* )?$"
4536
4637if [[ " $TRAVIS_TAG " =~ $tagPat ]]; then
4738 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
39+ if ! isReleaseJob; then
40+ echo " Not releasing on Java $ADOPTOPENJDK with Scala $TRAVIS_SCALA_VERSION "
41+ exit 0
6142 fi
6243fi
6344
@@ -70,4 +51,4 @@ export CI_SNAPSHOT_RELEASE="${projectPrefix}publish"
7051# for now, until we're confident in the new release scripts, just close the staging repo.
7152export CI_SONATYPE_RELEASE=" ; sonatypePrepare; sonatypeBundleUpload; sonatypeClose"
7253
73- sbt " $setTagScalaVersion " clean ${projectPrefix} test ${projectPrefix} publishLocal $releaseTask
54+ sbt clean ${projectPrefix} test ${projectPrefix} publishLocal $releaseTask
0 commit comments