diff --git a/bin/compile b/bin/compile index 00c005c..ce787b0 100755 --- a/bin/compile +++ b/bin/compile @@ -134,6 +134,11 @@ fi echo "grails.dependency.cache.dir = '$CACHE_DIR/.grails_cache'" >> $HOME/.grails/settings.groovy +# before doing a git push of your app specify heroku config:add GRAILS_ENV=yourenvironment +if [ $GRAILS_ENV ]; then + BUILD_ENV_OPT="-Dgrails.env=$GRAILS_ENV" +fi + # build app if [ "$GRAILS_VERSION" != "1.3.7" ] ; then BUILDCMD_OPT="-plain-output" @@ -144,7 +149,7 @@ echo "-----> Executing $COMPILECMD" eval "$COMPILECMD" | sed -u 's/^/ /' check_build_status -BUILDCMD="$GRAILS_CMD $BUILDCMD_OPT -Divy.default.ivy.user.dir=$CACHE_DIR war --non-interactive" +BUILDCMD="$GRAILS_CMD $BUILDCMD_OPT $BUILD_ENV_OPT -Divy.default.ivy.user.dir=$CACHE_DIR war --non-interactive" echo "-----> Executing $BUILDCMD" eval "$BUILDCMD" | sed -u 's/^/ /' check_build_status