Skip to content

A few changes to Travis build #228

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 5 commits into from
May 28, 2018
Merged
Show file tree
Hide file tree
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
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ env:
# SONA_PASS
- secure: "Xw7rI/qlML1nD2e2XwlakkhKAWNGZKqqE+Q3ntTvFpfHryl7KLCvVzJ4LIavnL6kGJaWOgy9vlSoEWn5g9nqHSfE31C/k5pY5nTMAKiwiJzfAS+r0asKXW2gmKhwtcTBkqyLVOZLCJSPVlFRQyfBJHY+Fs0L3KWcnMQgtBlyDhU="
matrix:
# The empty SCALAJS_VERSION will only compile for the JVM
- SCALAJS_VERSION=
- SCALAJS_VERSION=0.6.23
- SCALAJS_VERSION=1.0.0-M3
Expand All @@ -41,9 +42,6 @@ matrix:

script: admin/build.sh

notifications:
email: [email protected]

before_cache:
- find $HOME/.sbt -name "*.lock" | xargs rm
- find $HOME/.ivy2/cache -name "ivydata-*.properties" | xargs rm
Expand Down
9 changes: 6 additions & 3 deletions admin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

# Builds of tagged revisions are published to sonatype staging.

# Travis runs a build on new revisions and on new tags, so a tagged revision is built twice.
# Travis runs a build on revisions, including on new tags.
# Builds for a tag have TRAVIS_TAG defined, which we use for identifying tagged builds.
# Checking the local git clone would not work because git on travis does not fetch tags.

Expand All @@ -16,7 +16,8 @@ set -e
# of the existing tag. Then a new tag can be created for that commit, e.g., `v1.2.3#2.13.0-M5`.
# Everything after the `#` in the tag name is ignored.

if [[ "$TRAVIS_JDK_VERSION" == "openjdk6" && "$TRAVIS_SCALA_VERSION" =~ 2\.11\..* || "$TRAVIS_JDK_VERSION" == "oraclejdk8" && "$TRAVIS_SCALA_VERSION" =~ 2\.1[23]\..* ]]; then
if [[ "$TRAVIS_JDK_VERSION" == "openjdk6" && "$TRAVIS_SCALA_VERSION" =~ 2\.11\..* \
|| "$TRAVIS_JDK_VERSION" == "oraclejdk8" && "$TRAVIS_SCALA_VERSION" =~ 2\.1[23]\..* ]]; then
RELEASE_COMBO=true;
fi

Expand All @@ -30,7 +31,9 @@ verPat="[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)?"
tagPat="^v$verPat(#.*)?$"

if [[ "$TRAVIS_TAG" =~ $tagPat ]]; then
tagVer=$(echo $TRAVIS_TAG | sed s/#.*// | sed s/^v//)
tagVer=${TRAVIS_TAG}
tagVer=${tagVer#v} # Remove `v` at beginning.
tagVer=${tagVer%%#*} # Remove anything after `#`.
publishVersion='set every version := "'$tagVer'"'

if [ "$RELEASE_COMBO" = "true" ]; then
Expand Down