Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
Added a more detailed failure message with more info
Browse files Browse the repository at this point in the history
  • Loading branch information
jkutner committed May 21, 2015
1 parent bb4a9d9 commit 023285d
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions bin/compile
Expand Up @@ -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
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 023285d

Please sign in to comment.