From 84e1289acafedd391a55f94059b8a8392785cf28 Mon Sep 17 00:00:00 2001 From: Greg Burek Date: Fri, 28 Mar 2014 12:24:56 -0700 Subject: [PATCH 1/8] Remove netrc file, depend on HEROKU_API_KEY --- README.md | 5 ++--- bin/compile | 18 ------------------ bin/gen-netrc.sh | 10 ---------- 3 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 bin/gen-netrc.sh diff --git a/README.md b/README.md index 1ef286c..1f5f495 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,8 @@ Example usage: $ heroku config:add BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git - $ heroku config:add HEROKU_TOOLBELT_API_EMAIL=my-fake-email@gmail.com - - $ heroku config:add HEROKU_TOOLBELT_API_PASSWORD=`heroku auth:token` + $ heroku config:add HEROKU_API_KEY=`heroku auth:token` + $ heroku config:unset HEROKU_HOST $ cat .buildpacks https://github.com/heroku/heroku-buildpack-toolbelt.git diff --git a/bin/compile b/bin/compile index bad516d..7da522b 100755 --- a/bin/compile +++ b/bin/compile @@ -24,19 +24,6 @@ function error() { exit 1 } -function indent() { - c='s/^/ /' - case $(uname) in - Darwin) sed -l "$c";; - *) sed -u "$c";; - esac -} - -function package_download() { - engine="$1" - version="$2" - location="$3" - mkdir -p $location package="https://${S3_BUCKET}.s3.amazonaws.com/$engine-$version.tgz" curl $package -s -o - | tar xzf - -C $location @@ -61,9 +48,4 @@ fi mv heroku-client/* . rmdir heroku-client -echo "-----> Moving the netrc generation script into app/.profile.d" -mkdir -p $BUILD_DIR/.profile.d -cp "$BUILDPACK_DIR/bin/gen-netrc.sh" $BUILD_DIR/.profile.d/ -chmod +x $BUILD_DIR/.profile.d/gen-netrc.sh - echo "-----> heroku toolbelt installation done" diff --git a/bin/gen-netrc.sh b/bin/gen-netrc.sh deleted file mode 100644 index b484d51..0000000 --- a/bin/gen-netrc.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -cat >> ~/.netrc << EOF -machine api.heroku.com - login $HEROKU_TOOLBELT_API_EMAIL - password $HEROKU_TOOLBELT_API_PASSWORD -machine code.heroku.com - login $HEROKU_TOOLBELT_API_EMAIL - password $HEROKU_TOOLBELT_API_PASSWORD -EOF From 24b36bc71e23f814db5a6cd5b63724142d4435e0 Mon Sep 17 00:00:00 2001 From: Greg Burek Date: Fri, 28 Mar 2014 12:29:06 -0700 Subject: [PATCH 2/8] Adds more to README --- README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1f5f495..f7d8dbb 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,18 @@ Example usage: Notes ------ -Some PATH manipulation may be needed, expecially if you are using the -heroku-buildpack-ruby-minimal solely to provide a ruby execution environment -for the heroku cli gem. +WARNING: Your API token may change at any time for many reasons. If you are +getting authentication failures, try: +``` +$ heroku config:set HEROKU_API_KEY=`heroku auth:token` +``` + +Some PATH manipulation may be needed to successfully use the toolbelt, +especially if you are using the heroku-buildpack-ruby-minimal solely to provide +a ruby execution environment for the heroku cli gem, which will conflict with +the toolbelt. Try: + +``` +$ heroku run 'env PATH="/app/bin" vendor/heroku-toolbelt/bin/heroku apps' +``` From bc45c5241e8529eb418e1cab7b6c60f23fac9698 Mon Sep 17 00:00:00 2001 From: Ricardo Trindade Date: Sun, 19 Oct 2014 11:54:01 +0100 Subject: [PATCH 3/8] fixing partial function deleted when removing netrc --- bin/compile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/compile b/bin/compile index 7da522b..604b47d 100755 --- a/bin/compile +++ b/bin/compile @@ -24,6 +24,11 @@ function error() { exit 1 } +function package_download() { + engine="$1" + version="$2" + location="$3" + mkdir -p $location package="https://${S3_BUCKET}.s3.amazonaws.com/$engine-$version.tgz" curl $package -s -o - | tar xzf - -C $location From f171e955ba9608bf2131c99a0e9b2623b63e3050 Mon Sep 17 00:00:00 2001 From: Ricardo Trindade Date: Sun, 19 Oct 2014 23:24:10 +0100 Subject: [PATCH 4/8] add heroku toolbelt binary to path --- .profile.d/path.sh | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .profile.d/path.sh diff --git a/.profile.d/path.sh b/.profile.d/path.sh new file mode 100644 index 0000000..65f6047 --- /dev/null +++ b/.profile.d/path.sh @@ -0,0 +1,2 @@ +# add vendor binaries to the path +PATH=$PATH:/app/vendor/heroku-toolbelt/bin/ \ No newline at end of file From 04a6b7aecff0aa84db8f756e87ae0d00a1c9b8d1 Mon Sep 17 00:00:00 2001 From: Ricardo Trindade Date: Sun, 19 Oct 2014 23:39:40 +0100 Subject: [PATCH 5/8] add heroku toolbelt binary to path --- bin/compile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/compile b/bin/compile index 604b47d..10d4116 100755 --- a/bin/compile +++ b/bin/compile @@ -53,4 +53,11 @@ fi mv heroku-client/* . rmdir heroku-client +# Add heroku toolbelt to the PATH +mkdir -p .profile.d +cat > .profile.d/path.sh < heroku toolbelt installation done" From fe7ebbe723bb814342ef229e66d787c73252e237 Mon Sep 17 00:00:00 2001 From: Ricardo Trindade Date: Sun, 19 Oct 2014 23:47:51 +0100 Subject: [PATCH 6/8] add heroku toolbelt binary to path --- .profile.d/path.sh | 2 -- bin/compile | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 .profile.d/path.sh diff --git a/.profile.d/path.sh b/.profile.d/path.sh deleted file mode 100644 index 65f6047..0000000 --- a/.profile.d/path.sh +++ /dev/null @@ -1,2 +0,0 @@ -# add vendor binaries to the path -PATH=$PATH:/app/vendor/heroku-toolbelt/bin/ \ No newline at end of file diff --git a/bin/compile b/bin/compile index 10d4116..3874d53 100755 --- a/bin/compile +++ b/bin/compile @@ -55,7 +55,7 @@ rmdir heroku-client # Add heroku toolbelt to the PATH mkdir -p .profile.d -cat > .profile.d/path.sh < $HOME/.profile.d/path.sh < Date: Sun, 19 Oct 2014 23:50:48 +0100 Subject: [PATCH 7/8] add heroku toolbelt binary to path --- bin/compile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/compile b/bin/compile index 3874d53..35b951a 100755 --- a/bin/compile +++ b/bin/compile @@ -54,8 +54,8 @@ mv heroku-client/* . rmdir heroku-client # Add heroku toolbelt to the PATH -mkdir -p .profile.d -cat > $HOME/.profile.d/path.sh < /app/.profile.d/path.sh < Date: Mon, 20 Oct 2014 00:00:27 +0100 Subject: [PATCH 8/8] add heroku toolbelt binary to path --- bin/compile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/compile b/bin/compile index 35b951a..81d4e25 100755 --- a/bin/compile +++ b/bin/compile @@ -54,8 +54,9 @@ mv heroku-client/* . rmdir heroku-client # Add heroku toolbelt to the PATH -mkdir -p /app/.profile.d -cat > /app/.profile.d/path.sh < "$BUILD_DIR/.profile.d/path.sh" <