Skip to content

Commit 8a84b17

Browse files
authored
Merge pull request #267 from lrytz/manual-backpublish
do backpublishing manually
2 parents d2e6685 + 5eedf54 commit 8a84b17

File tree

1 file changed

+10
-27
lines changed

1 file changed

+10
-27
lines changed

build.sh

+10-27
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ set -e
1010
# sbt-dynver sets the version number from the tag
1111
# sbt-travisci sets the Scala version from the travis job matrix
1212

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`)
1618

1719
# For normal tags that are cross-built, we release on JDK 8 for Scala 2.x
1820
isReleaseJob() {
@@ -23,15 +25,6 @@ isReleaseJob() {
2325
fi
2426
}
2527

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-
3528
if [[ "$SCALAJS_VERSION" != "" ]]; then
3629
projectPrefix="parserCombinatorsJS"
3730
elif [[ "$SCALANATIVE_VERSION" != "" ]]; then
@@ -41,23 +34,13 @@ else
4134
fi
4235

4336
verPat="[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)?"
44-
tagPat="^v$verPat(#$verPat)?$"
37+
tagPat="^v$verPat(#.*)?$"
4538

4639
if [[ "$TRAVIS_TAG" =~ $tagPat ]]; then
4740
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
6144
fi
6245
fi
6346

@@ -70,4 +53,4 @@ export CI_SNAPSHOT_RELEASE="$projectPrefix/publish"
7053
# for now, until we're confident in the new release scripts, just close the staging repo.
7154
export CI_SONATYPE_RELEASE="; sonatypePrepare; sonatypeBundleUpload; sonatypeClose"
7255

73-
sbt "$setTagScalaVersion" clean $projectPrefix/test $projectPrefix/publishLocal $releaseTask
56+
sbt clean $projectPrefix/test $projectPrefix/publishLocal $releaseTask

0 commit comments

Comments
 (0)