Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,23 @@ isTagScalaReleaseJob() {
fi
}

# For tags that define a Scala.js version, we pick the jobs of one Scala.js version (1.0.0) to do the releases
isTagScalaJsReleaseJob() {
if [[ "$ADOPTOPENJDK" == "8" && "$SCALAJS_VERSION" =~ ^1\.0\.0(-[A-Za-z0-9-]+)?$ ]]; then
true
else
false
fi
}

if [[ "$SCALAJS_VERSION" == "" ]]; then
projectPrefix="xml"
else
projectPrefix="xmlJS"
fi

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

if [[ "$TRAVIS_TAG" =~ $tagPat ]]; then
releaseTask="ci-release"
Expand All @@ -49,6 +58,11 @@ if [[ "$TRAVIS_TAG" =~ $tagPat ]]; then
echo "Not releasing on Java $ADOPTOPENJDK with Scala $TRAVIS_SCALA_VERSION"
exit 0
fi
elif [[ "$tagScalaVer" == "sjs_$SCALAJS_VERSION" ]]; then
if ! isTagScalaJsReleaseJob; then
echo "The releases for Scala.js $tagScalaVer are built by other jobs in the travis job matrix"
exit 0
fi
else
if isTagScalaReleaseJob; then
setTagScalaVersion='set every scalaVersion := "'$tagScalaVer'"'
Expand Down