Skip to content

Commit 0507fbf

Browse files
authored
Merge pull request #376 from ashawley/pub-scalajs-tags
Publish Scala.js from tag in Travis
2 parents f2ca872 + 8444220 commit 0507fbf

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

build.sh

+15-1
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,23 @@ isTagScalaReleaseJob() {
3232
fi
3333
}
3434

35+
# For tags that define a Scala.js version, we pick the jobs of one Scala.js version (1.0.0) to do the releases
36+
isTagScalaJsReleaseJob() {
37+
if [[ "$ADOPTOPENJDK" == "8" && "$SCALAJS_VERSION" =~ ^1\.0\.0(-[A-Za-z0-9-]+)?$ ]]; then
38+
true
39+
else
40+
false
41+
fi
42+
}
43+
3544
if [[ "$SCALAJS_VERSION" == "" ]]; then
3645
projectPrefix="xml"
3746
else
3847
projectPrefix="xmlJS"
3948
fi
4049

4150
verPat="[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)?"
42-
tagPat="^v$verPat(#$verPat)?$"
51+
tagPat="^v$verPat(#(sjs_)?$verPat)?$"
4352

4453
if [[ "$TRAVIS_TAG" =~ $tagPat ]]; then
4554
releaseTask="ci-release"
@@ -49,6 +58,11 @@ if [[ "$TRAVIS_TAG" =~ $tagPat ]]; then
4958
echo "Not releasing on Java $ADOPTOPENJDK with Scala $TRAVIS_SCALA_VERSION"
5059
exit 0
5160
fi
61+
elif [[ "$tagScalaVer" == "sjs_$SCALAJS_VERSION" ]]; then
62+
if ! isTagScalaJsReleaseJob; then
63+
echo "The releases for Scala.js $tagScalaVer are built by other jobs in the travis job matrix"
64+
exit 0
65+
fi
5266
else
5367
if isTagScalaReleaseJob; then
5468
setTagScalaVersion='set every scalaVersion := "'$tagScalaVer'"'

0 commit comments

Comments
 (0)