Skip to content

Publish Scala.js from tag in Travis #376

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 17, 2019
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