From a39a5d6d7132418fd231546d7fccfb32e7d26f04 Mon Sep 17 00:00:00 2001 From: Ian Ynda-Hummel Date: Mon, 28 Jul 2014 16:12:29 -0400 Subject: [PATCH 1/3] Take buildpacks file name from environment if available --- bin/compile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/compile b/bin/compile index 663a645..1742d39 100755 --- a/bin/compile +++ b/bin/compile @@ -12,7 +12,13 @@ function indent() { unset GIT_DIR -for BUILDPACK in $(cat $1/.buildpacks); do +DEFAULT_BUILDPACKS_FILE=".buildpacks" + +if [ -z "$BUILDPACKS_FILE" ]; then + BUILDPACKS_FILE=$DEFAULT_BUILDPACKS_FILE +fi + +for BUILDPACK in $(cat $1/$BUILDPACKS_FILE); do dir=$(mktemp -t buildpackXXXXX) rm -rf $dir From 82932b09ef8e7b773bf2a2196155456343f9316b Mon Sep 17 00:00:00 2001 From: Ian Ynda-Hummel Date: Mon, 28 Jul 2014 16:14:10 -0400 Subject: [PATCH 2/3] Output the buildpacks file being used --- bin/compile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/compile b/bin/compile index 1742d39..78aa17e 100755 --- a/bin/compile +++ b/bin/compile @@ -18,6 +18,8 @@ if [ -z "$BUILDPACKS_FILE" ]; then BUILDPACKS_FILE=$DEFAULT_BUILDPACKS_FILE fi +echo "=====> Using buildpacks file: $BUILDPACKS_FILE" + for BUILDPACK in $(cat $1/$BUILDPACKS_FILE); do dir=$(mktemp -t buildpackXXXXX) rm -rf $dir From ea5a507db3c46f5af4e5d69496d67699870a75d7 Mon Sep 17 00:00:00 2001 From: Ian Ynda-Hummel Date: Mon, 28 Jul 2014 16:39:57 -0400 Subject: [PATCH 3/3] Fix the use of environment variables --- bin/compile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/compile b/bin/compile index 78aa17e..8ad2be5 100755 --- a/bin/compile +++ b/bin/compile @@ -14,7 +14,9 @@ unset GIT_DIR DEFAULT_BUILDPACKS_FILE=".buildpacks" -if [ -z "$BUILDPACKS_FILE" ]; then +if [ -f "$3/BUILDPACKS_FILE" ]; then + BUILDPACKS_FILE=$(cat "$3/BUILDPACKS_FILE") +else BUILDPACKS_FILE=$DEFAULT_BUILDPACKS_FILE fi