Skip to content
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

Fixing Travis scripts #291

Closed
wants to merge 3 commits into from
Closed
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
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ before_install: curl -Ls https://git.io/jabba | bash && . ~/.jabba/jabba.sh
install: jabba install "adopt@~1.$TRAVIS_JDK.0-0" && jabba use "$_" && java -Xmx32m -version

script:
- ./scripts/test-code.sh
- ./scripts/validate-code.sh
- ./scripts/validate-docs.sh
- ./scripts/test-code.sh || travis_terminate 1
- ./scripts/validate-code.sh || travis_terminate 1
- ./scripts/validate-docs.sh || travis_terminate 1

cache:
directories:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import scala.collection.immutable
import scala.collection.JavaConverters
import scala.reflect.ClassTag

case class BaseScalaTemplate[T <: Appendable[T], F <: Format[T]](format: F) {
case class BaseScalaTemplate[T <: Appendable[T], F <: Format[T]](format: F) {
// The overloaded methods are here for speed. The compiled templates
// can take advantage of them for a 12% performance boost
def _display_(x: AnyVal): T = format.escape(x.toString)
def _display_(x: AnyVal): T = format.escape(x.toString)
def _display_(x: String): T = if (x eq null) format.empty else format.escape(x)
def _display_(x: Unit): T = format.empty
def _display_(x: scala.xml.NodeSeq): T = if (x eq null) format.empty else format.raw(x.toString())
Expand Down
4 changes: 2 additions & 2 deletions scripts/test-code.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash

sbt "++ $TRAVIS_SCALA_VERSION test" || travis_terminate 1
sbt +publishLocal plugin/test plugin/scripted || travis_terminate 1
sbt "++ $TRAVIS_SCALA_VERSION test" || exit 1
sbt +publishLocal plugin/test plugin/scripted || exit 1
3 changes: 1 addition & 2 deletions scripts/validate-code.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env bash

sbt ++$TRAVIS_SCALA_VERSION validateCode || travis_terminate 1
sbt "++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues" || travis_terminate 1
sbt ";++$TRAVIS_SCALA_VERSION ;validateCode ;mimaReportBinaryIssues" || exit 1
4 changes: 2 additions & 2 deletions scripts/validate-docs.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash

pushd docs || travis_terminate 1
sbt evaluateSbtFiles validateDocs headerCheck test:headerCheck test || travis_terminate 1
pushd docs || exit 1
sbt evaluateSbtFiles validateDocs headerCheck test:headerCheck test || exit 1
popd