Skip to content

Commit

Permalink
Added stderr message when bin/detect fails
Browse files Browse the repository at this point in the history
  • Loading branch information
jkutner committed Sep 13, 2017
1 parent 21af6fc commit c8a21da
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion bin/detect
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ if detect_sbt $BUILD_DIR ; then
fi
exit 0
else
echo "no" && exit 1
(>&2 echo "Could not find a 'build.sbt' file! Please ensure it exists and is checked into Git.")
exit 1
fi
4 changes: 2 additions & 2 deletions etc/hatchet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

BUILDPACK_NAME="heroku-buildpack-scala"

if [ "$CIRCLECI" == "true" && -n "$CI_PULL_REQUEST" ]; then
if [ "$CIRCLECI" == "true" ] && [ -n "$CI_PULL_REQUEST" ]; then
if [ "$CIRCLE_PR_USERNAME" != "heroku" ]; then
echo "Skipping integration tests on forked PR."
exit 0
fi
fi

if [ "$TRAVIS" == "true" && "$TRAVIS_PULL_REQUEST" != "false" ]; then
if [ "$TRAVIS" == "true" ] && [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
if [ "$TRAVIS_PULL_REQUEST_SLUG" != "heroku/$BUILDPACK_NAME" ]; then
echo "Skipping integration tests on forked PR."
exit 0
Expand Down
12 changes: 6 additions & 6 deletions test/detect_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ testDetect_SbtFileFoundInRoot()
{
touch ${BUILD_DIR}/something.sbt

detect
detect

assertAppDetected "Scala"
}
Expand Down Expand Up @@ -79,7 +79,7 @@ testDetect_ApplicationConfFileDetectsAsPlay20Scala()
touch ${BUILD_DIR}/app/something.scala
mkdir ${BUILD_DIR}/app/views
touch ${BUILD_DIR}/app/something.scala.html

detect

assertAppDetected "Play 2.x - Scala"
Expand All @@ -95,7 +95,7 @@ testDetect_ApplicationConfFileDetectsAsPlay20Java()
touch ${BUILD_DIR}/app/something.java
mkdir ${BUILD_DIR}/app/views
touch ${BUILD_DIR}/app/something.scala.html

detect

assertAppDetected "Play 2.x - Java"
Expand All @@ -104,7 +104,7 @@ testDetect_ApplicationConfFileDetectsAsPlay20Java()

testDetect_NotFound()
{
detect
assertNoAppDetected
detect

assertEquals "1" "${RETURN}"
}

0 comments on commit c8a21da

Please sign in to comment.