Skip to content

Commit 488f069

Browse files
authored
Merge pull request #228 from ashawley/travis-rework
A few changes to Travis build
2 parents 66ec1d6 + 88045b2 commit 488f069

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.travis.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ env:
2424
# SONA_PASS
2525
- secure: "Xw7rI/qlML1nD2e2XwlakkhKAWNGZKqqE+Q3ntTvFpfHryl7KLCvVzJ4LIavnL6kGJaWOgy9vlSoEWn5g9nqHSfE31C/k5pY5nTMAKiwiJzfAS+r0asKXW2gmKhwtcTBkqyLVOZLCJSPVlFRQyfBJHY+Fs0L3KWcnMQgtBlyDhU="
2626
matrix:
27+
# The empty SCALAJS_VERSION will only compile for the JVM
2728
- SCALAJS_VERSION=
2829
- SCALAJS_VERSION=0.6.23
2930
- SCALAJS_VERSION=1.0.0-M3
@@ -41,9 +42,6 @@ matrix:
4142

4243
script: admin/build.sh
4344

44-
notifications:
45-
46-
4745
before_cache:
4846
- find $HOME/.sbt -name "*.lock" | xargs rm
4947
- find $HOME/.ivy2/cache -name "ivydata-*.properties" | xargs rm

admin/build.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44

55
# Builds of tagged revisions are published to sonatype staging.
66

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

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

19-
if [[ "$TRAVIS_JDK_VERSION" == "openjdk6" && "$TRAVIS_SCALA_VERSION" =~ 2\.11\..* || "$TRAVIS_JDK_VERSION" == "oraclejdk8" && "$TRAVIS_SCALA_VERSION" =~ 2\.1[23]\..* ]]; then
19+
if [[ "$TRAVIS_JDK_VERSION" == "openjdk6" && "$TRAVIS_SCALA_VERSION" =~ 2\.11\..* \
20+
|| "$TRAVIS_JDK_VERSION" == "oraclejdk8" && "$TRAVIS_SCALA_VERSION" =~ 2\.1[23]\..* ]]; then
2021
RELEASE_COMBO=true;
2122
fi
2223

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

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

3639
if [ "$RELEASE_COMBO" = "true" ]; then

0 commit comments

Comments
 (0)