Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.

Add deploy version filter to build.sh #32

Merged
merged 1 commit into from
Apr 21, 2017
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
11 changes: 9 additions & 2 deletions admin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,20 @@ set -e
verPat="[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)?"
tagPat="^v$verPat(#$verPat)?$"

if [[ "$TRAVIS_TAG" =~ $tagPat ]]; then
scalaVer=$(echo $TRAVIS_TAG | sed s/[^#]*// | sed s/^#//)
if [[ $scalaVer == "2.11"* ]]; then
publishJdk="openjdk6"
else
publishJdk="oraclejdk8"
fi

if [ "$TRAVIS_JDK_VERSION" == "$publishJdk" ] && [[ "$TRAVIS_TAG" =~ $tagPat ]]; then

echo "Going to release from tag $TRAVIS_TAG!"

tagVer=$(echo $TRAVIS_TAG | sed s/#.*// | sed s/^v//)
publishVersion='set every version := "'$tagVer'"'

scalaVer=$(echo $TRAVIS_TAG | sed s/[^#]*// | sed s/^#//)
if [ "$scalaVer" != "" ]; then
publishScalaVersion='set every crossScalaVersions := Seq("'$scalaVer'")'
fi
Expand Down