From ea1e5f79ce8e711c0d731f5b0347b6fd8869e0dc Mon Sep 17 00:00:00 2001 From: Eugene Skopa Date: Wed, 19 Jul 2017 12:06:26 +0200 Subject: [PATCH 1/3] Removed cache removal commad. It breaks Dokku. --- bin/compile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/compile b/bin/compile index 0f36590..0760ca4 100755 --- a/bin/compile +++ b/bin/compile @@ -11,7 +11,7 @@ CACHE_DIR=$2 CACHED_DIRS=".heroku" WORKING_DIR=$(pwd) -rm -fr $CACHE_DIR +#rm -fr $CACHE_DIR mkdir -p $CACHE_DIR # Versions. @@ -101,4 +101,3 @@ fi cp $ROOT_DIR/conf/mime.types $BUILD_DIR/ cp $BIN_DIR/launch-nginx "$BUILD_DIR/local/sbin" - From c4841b0e289684d8c32b047738eabef75c13b37e Mon Sep 17 00:00:00 2001 From: Eugene Skopa Date: Wed, 19 Jul 2017 12:31:35 +0200 Subject: [PATCH 2/3] Added PLATFORM env var to manage cache removal behaviour. --- bin/compile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/compile b/bin/compile index 0760ca4..9cb42d6 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 [[ -z ${PLATFORM+HEROKU} == "HEROKU" ]]; then + rm -fr $CACHE_DIR +fi mkdir -p $CACHE_DIR # Versions. From 37ecd741bf3346f93e47ff3b666e0f8dfb8798c9 Mon Sep 17 00:00:00 2001 From: Eugene Skopa Date: Wed, 19 Jul 2017 13:13:20 +0200 Subject: [PATCH 3/3] Fixed faulty conditional statement testing the value of PLATFORM env var in /bin/compile. --- bin/compile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/compile b/bin/compile index 9cb42d6..bf7fb18 100755 --- a/bin/compile +++ b/bin/compile @@ -12,7 +12,7 @@ CACHED_DIRS=".heroku" WORKING_DIR=$(pwd) # If PLATFORM is undefined or defined as HEROKU then remove cache directory. -if [[ -z ${PLATFORM+HEROKU} == "HEROKU" ]]; then +if [[ "${PLATFORM:-HEROKU}" == "HEROKU" ]]; then rm -fr $CACHE_DIR fi mkdir -p $CACHE_DIR