Skip to content
Browse files

Detect upcoming Gruntfiles, export required env vars

  • Loading branch information...
1 parent ae6d524 commit 1ef338229b5964e1acd257d7e57ec2bbd14c7fad @Almad Almad committed Nov 27, 2012
Showing with 10 additions and 2 deletions.
  1. +10 −2 bin/compile
View
12 bin/compile
@@ -7,6 +7,10 @@ set -e
# debug
# set -x
+# preserve git directory, which is in /app/repo.git
+# GIT_DIR is '.', otherwise it would be good to join'em
+export APPLICATION_GIT_DIR=`pwd`
+
# clean up leaking environment
unset GIT_DIR
@@ -174,11 +178,15 @@ run_npm "rebuild"
echo "Dependencies installed" | indent
echo "-----> Building runtime environment"
+if [ -f /app/tmp/push_metadata.yml ]; then
+ export APPLICATION_PUSH_METADATA_FILE="/app/tmp/push_metadata.yml"
+fi;
+export APPLICATION_TMP_REPODIR=$(mktmpdir actual_repository)
mkdir -p $BUILD_DIR/.profile.d
echo "export PATH=\"\$HOME/bin:\$HOME/node_modules/.bin:\$PATH\"" > $BUILD_DIR/.profile.d/nodejs.sh
-if [ -f $BUILD_DIR/grunt.js ]; then
- echo "-----> Found gruntfile (grunt.js), running grunt heroku task"
+if [ -f $BUILD_DIR/grunt.js ] || [ -f $BUILD_DIR/Gruntfile.js ] || [ -f $BUILD_DIR/Gruntfile.coffee ]; then
+ echo "-----> Found gruntfile, running grunt heroku task"
$BUILD_DIR/node_modules/grunt/bin/grunt heroku
else
echo "-----> No gruntfile (grunt.js) found"

0 comments on commit 1ef3382

Please sign in to comment.
Something went wrong with that request. Please try again.