From 023285dde7df0aaeb867ce75630b7a40ab4b963c Mon Sep 17 00:00:00 2001 From: Joe Kutner Date: Thu, 21 May 2015 12:00:11 -0500 Subject: [PATCH] Added a more detailed failure message with more info --- bin/compile | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/bin/compile b/bin/compile index e72b55a..b140467 100755 --- a/bin/compile +++ b/bin/compile @@ -27,11 +27,23 @@ GRAILS_CMD="grails" check_build_status() { if [ "${PIPESTATUS[*]}" != "0 0" ]; then - echo " ! Failed to build app" - exit 1 + error_build_failed fi } +error_build_failed() +{ + error "Failed to build app! +We're sorry this build is failing! If you can't find the issue in application +code, please submit a ticket so we can help: https://help.heroku.com +You can also try reverting to our legacy Grails buildpack: + + $ heroku buildpacks:set https://github.com/heroku/heroku-buildpack-grails#legacy + +Thanks, +Heroku" +} + install_grails() { VER_TO_INSTALL=$1 @@ -63,9 +75,8 @@ install_grails() } if [ ! -f $BUILD_DIR/application.properties ] ; then - echo "-----> File not found: application.properties. This file is required. Build failed." - echo " ! Failed to build app" - exit 1 + echo "-----> File not found: application.properties. This file is required." + error_build_failed fi GRAILS_VERSION=$(get_property $BUILD_DIR/application.properties 'app.grails.version')