Skip to content

Commit 85e17c1

Browse files
committed
do backpublishing manually
1 parent 174cb66 commit 85e17c1

File tree

3 files changed

+14
-51
lines changed

3 files changed

+14
-51
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ env:
1919
matrix:
2020
exclude:
2121
- scala: 0.22.0-RC1
22-
env: SCALAJS_VERSION=0.6.32 ADOPTOPENJDK=8
22+
env: SCALAJS_VERSION=0.6.32 ADOPTOPENJDK=8
2323
- scala: 0.22.0-RC1
24-
env: SCALAJS_VERSION=1.0.0 ADOPTOPENJDK=8
24+
env: SCALAJS_VERSION=1.0.0 ADOPTOPENJDK=8
2525

2626
install:
2727
- git fetch --tags # get all tags for sbt-dynver

build.sbt

-2
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,6 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform)
161161
}
162162
)
163163
.jsSettings(
164-
// The config for Travis has an exclude, but sbt-travisci doesn't catch it.
165-
crossScalaVersions -= "0.22.0-RC1",
166164
// Scala.js cannot run forked tests
167165
fork in Test := false
168166
)

build.sh

+12-47
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,15 @@ 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

17-
# For normal tags that are cross-built, we release on JDK 8 for Scala 2.x and Dotty 0.x
19+
# We release on JDK 8 (for Scala 2.x and Dotty 0.x)
1820
isReleaseJob() {
19-
if [[ "$ADOPTOPENJDK" == "8" && "$TRAVIS_SCALA_VERSION" =~ ^2\.1[234]\..*$ ]]; then
20-
true
21-
elif [[ "$ADOPTOPENJDK" == "8" && "$TRAVIS_SCALA_VERSION" =~ ^0\.[0-9]+\..*$ ]]; then
22-
true
23-
else
24-
false
25-
fi
26-
}
27-
28-
# For tags that define a Scala version, we pick the jobs of a Scala version (2.13.x) or Dotty (0.x) to do the releases
29-
isTagScalaReleaseJob() {
30-
if [[ "$ADOPTOPENJDK" == "8" && "$TRAVIS_SCALA_VERSION" =~ ^2\.13\.[0-9]+$ ]]; then
31-
true
32-
elif [[ "$ADOPTOPENJDK" == "8" && "$TRAVIS_SCALA_VERSION" =~ ^0\.[0-9]+\..*$ ]]; then
33-
true
34-
else
35-
false
36-
fi
37-
}
38-
39-
# For tags that define a Scala.js version, we pick the jobs of one Scala.js version (1.0.0) to do the releases
40-
isTagScalaJsReleaseJob() {
41-
if [[ "$ADOPTOPENJDK" == "8" && "$SCALAJS_VERSION" =~ ^1\.0\.0(-[A-Za-z0-9-]+)?$ ]]; then
21+
if [[ "$ADOPTOPENJDK" == "8" ]]; then
4222
true
4323
else
4424
false
@@ -52,28 +32,13 @@ else
5232
fi
5333

5434
verPat="[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)?"
55-
tagPat="^v$verPat(#(sjs_)?$verPat)?$"
35+
tagPat="^v$verPat(#.*)?$"
5636

5737
if [[ "$TRAVIS_TAG" =~ $tagPat ]]; then
5838
releaseTask="ci-release"
59-
tagScalaVer=$(echo $TRAVIS_TAG | sed s/[^#]*// | sed s/^#//)
60-
if [[ "$tagScalaVer" == "" ]]; then
61-
if ! isReleaseJob; then
62-
echo "Not releasing on Java $ADOPTOPENJDK with Scala $TRAVIS_SCALA_VERSION"
63-
exit 0
64-
fi
65-
elif [[ "$tagScalaVer" == "sjs_$SCALAJS_VERSION" ]]; then
66-
if ! isTagScalaJsReleaseJob; then
67-
echo "The releases for Scala.js $tagScalaVer are built by other jobs in the travis job matrix"
68-
exit 0
69-
fi
70-
else
71-
if isTagScalaReleaseJob; then
72-
setTagScalaVersion='set every scalaVersion := "'$tagScalaVer'"'
73-
else
74-
echo "The releases for Scala $tagScalaVer are built by other jobs in the travis job matrix"
75-
exit 0
76-
fi
39+
if ! isReleaseJob; then
40+
echo "Not releasing on Java $ADOPTOPENJDK with Scala $TRAVIS_SCALA_VERSION"
41+
exit 0
7742
fi
7843
fi
7944

@@ -86,4 +51,4 @@ export CI_SNAPSHOT_RELEASE="$projectPrefix/publish"
8651
# for now, until we're confident in the new release scripts, just close the staging repo.
8752
export CI_SONATYPE_RELEASE="; sonatypePrepare; sonatypeBundleUpload; sonatypeClose"
8853

89-
sbt "$setTagScalaVersion" clean $projectPrefix/test $projectPrefix/publishLocal $releaseTask
54+
sbt clean $projectPrefix/test $projectPrefix/publishLocal $releaseTask

0 commit comments

Comments
 (0)