diff --git a/bin/compile b/bin/compile index 0f36590..bf7fb18 100755 --- a/bin/compile +++ b/bin/compile @@ -11,7 +11,10 @@ CACHE_DIR=$2 CACHED_DIRS=".heroku" WORKING_DIR=$(pwd) -rm -fr $CACHE_DIR +# If PLATFORM is undefined or defined as HEROKU then remove cache directory. +if [[ "${PLATFORM:-HEROKU}" == "HEROKU" ]]; then + rm -fr $CACHE_DIR +fi mkdir -p $CACHE_DIR # Versions. @@ -101,4 +104,3 @@ fi cp $ROOT_DIR/conf/mime.types $BUILD_DIR/ cp $BIN_DIR/launch-nginx "$BUILD_DIR/local/sbin" -