From 56801e04985b56e8f66687861d15447ab464dc8d Mon Sep 17 00:00:00 2001 From: "peter.boulderstone" Date: Thu, 22 Aug 2019 09:31:02 +0100 Subject: [PATCH 1/4] fixes nested environmental values not being parsed when defined in the same file --- include/buildpack.bash | 4 ++-- tests/unit/tests.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/buildpack.bash b/include/buildpack.bash index d45ebd72f..d3a6071b8 100644 --- a/include/buildpack.bash +++ b/include/buildpack.bash @@ -17,7 +17,7 @@ _envfile-parse() { value=\""${value}"\" ;; esac - echo "export ${key}=${value}" + export ${key}=${value} done <<< "$(cat)" } @@ -171,7 +171,7 @@ buildpack-setup() { # Buildstep backwards compatibility if [[ -f "$app_path/.env" ]]; then # shellcheck disable=SC2046 - eval $(cat "$app_path/.env" | _envfile-parse) + cat "$app_path/.env" | _envfile-parse fi } diff --git a/tests/unit/tests.sh b/tests/unit/tests.sh index 5c66e3c78..756c50c10 100644 --- a/tests/unit/tests.sh +++ b/tests/unit/tests.sh @@ -7,7 +7,7 @@ T_envfile-parse(){ local bar_expected='te'\''st' fixture_filename="$(dirname "${BASH_SOURCE[0]}")/fixtures/complicated_envfile" - eval "$(cat "$fixture_filename" | _envfile-parse)" + cat "$fixture_filename" | _envfile-parse # shellcheck disable=2154 if [[ ! "$foo_expected" == "$foo" ]]; then From 1fa898de513869ac06277b1efdaa04dfbc71c88d Mon Sep 17 00:00:00 2001 From: "peter.boulderstone" Date: Thu, 22 Aug 2019 10:12:22 +0100 Subject: [PATCH 2/4] reverted expected nested env value fix and added tests to confirm issue --- include/buildpack.bash | 4 ++-- tests/unit/fixtures/complicated_envfile | 2 ++ tests/unit/tests.sh | 16 +++++++++++++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/include/buildpack.bash b/include/buildpack.bash index d3a6071b8..d45ebd72f 100644 --- a/include/buildpack.bash +++ b/include/buildpack.bash @@ -17,7 +17,7 @@ _envfile-parse() { value=\""${value}"\" ;; esac - export ${key}=${value} + echo "export ${key}=${value}" done <<< "$(cat)" } @@ -171,7 +171,7 @@ buildpack-setup() { # Buildstep backwards compatibility if [[ -f "$app_path/.env" ]]; then # shellcheck disable=SC2046 - cat "$app_path/.env" | _envfile-parse + eval $(cat "$app_path/.env" | _envfile-parse) fi } diff --git a/tests/unit/fixtures/complicated_envfile b/tests/unit/fixtures/complicated_envfile index 46e1f442d..15cf6bf00 100644 --- a/tests/unit/fixtures/complicated_envfile +++ b/tests/unit/fixtures/complicated_envfile @@ -1,2 +1,4 @@ foo='Hello'$'\n'' '\''world'\'' ' bar='te'\''st' +nested_foo=foo +nested_bar=${nested_foo} diff --git a/tests/unit/tests.sh b/tests/unit/tests.sh index 756c50c10..8733faff5 100644 --- a/tests/unit/tests.sh +++ b/tests/unit/tests.sh @@ -5,9 +5,11 @@ T_envfile-parse(){ local fixture_filename local foo_expected='Hello'$'\n'' '\''world'\'' ' local bar_expected='te'\''st' + local nested_foo_expected=foo + local nested_bar_expected=foo fixture_filename="$(dirname "${BASH_SOURCE[0]}")/fixtures/complicated_envfile" - cat "$fixture_filename" | _envfile-parse + eval "$(cat "$fixture_filename" | _envfile-parse)" # shellcheck disable=2154 if [[ ! "$foo_expected" == "$foo" ]]; then @@ -20,6 +22,18 @@ T_envfile-parse(){ echo "Expected bar = $bar_expected got: $bar" return 2 fi + + # shellcheck disable=2154 + if [[ ! "$nested_foo_expected" == "$nested_foo" ]]; then + echo "Expected nested_foo = $nested_foo_expected got: $nested_foo" + return 3 + fi + + # shellcheck disable=2154 + if [[ ! "$nested_bar_expected" == "$nested_bar" ]]; then + echo "Expected nested_bar = $nested_bar_expected got: $nested_bar" + return 4 + fi } T_procfile-parse-valid() { From 357af3aff68c524b042cb92122602cbd22feb411 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 1 Apr 2020 13:59:16 -0400 Subject: [PATCH 3/4] Update ruby to version v213 --- buildpacks/buildpack-ruby/buildpack-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildpacks/buildpack-ruby/buildpack-version b/buildpacks/buildpack-ruby/buildpack-version index 03493f92b..2b391c624 100644 --- a/buildpacks/buildpack-ruby/buildpack-version +++ b/buildpacks/buildpack-ruby/buildpack-version @@ -1 +1 @@ -v212 +v213 From 440a29785b2e81668fe4cef4c040e0261e221f39 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 1 Apr 2020 15:33:26 -0400 Subject: [PATCH 4/4] Release 0.5.10 --- CHANGELOG.md | 8 +++++++- Dockerfile | 2 +- Makefile | 2 +- README.md | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d59b132c2..ce9f9a33f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ All notable changes to this project will be documented in this file. ### Changed +## [0.5.10] - 2020-04-01 + +### Changed +- @josegonzalez Update ruby to version v213 + ## [0.5.9] - 2020-03-31 ### Changed - @josegonzalez Update go to version v139 @@ -639,7 +644,8 @@ All notable changes to this project will be documented in this file. - User for `buildpack-build` is `$USER` or randomized - User for `procfile-exec` is `$USER` or detected from `/app` -[unreleased]: https://github.com/gliderlabs/herokuish/compare/v0.5.9...HEAD +[unreleased]: https://github.com/gliderlabs/herokuish/compare/v0.5.10...HEAD +[0.5.10]: https://github.com/gliderlabs/herokuish/compare/v0.5.9...v0.5.10 [0.5.9]: https://github.com/gliderlabs/herokuish/compare/v0.5.8...v0.5.9 [0.5.8]: https://github.com/gliderlabs/herokuish/compare/v0.5.7...v0.5.8 [0.5.7]: https://github.com/gliderlabs/herokuish/compare/v0.5.6...v0.5.7 diff --git a/Dockerfile b/Dockerfile index 15fc86b4b..0ea9675fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ RUN apt-get update -qq \ && mv /etc/ImageMagick-6/policy.xml.custom /etc/ImageMagick-6/policy.xml \ && apt-get clean \ && rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/* /var/tmp/* -RUN curl "https://github.com/gliderlabs/herokuish/releases/download/v0.5.9/herokuish_0.5.9_linux_x86_64.tgz" \ +RUN curl "https://github.com/gliderlabs/herokuish/releases/download/v0.5.10/herokuish_0.5.10_linux_x86_64.tgz" \ --silent -L | tar -xzC /bin RUN /bin/herokuish buildpack install \ && ln -s /bin/herokuish /build \ diff --git a/Makefile b/Makefile index 6e45e7b0a..d562bb2ba 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ NAME = herokuish HARDWARE = $(shell uname -m) -VERSION ?= 0.5.9 +VERSION ?= 0.5.10 IMAGE_NAME ?= $(NAME) BUILD_TAG ?= dev diff --git a/README.md b/README.md index 4fccdfb13..e3c5b93c2 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Circle CI](https://circleci.com/gh/gliderlabs/herokuish.png?style=shield)](https://circleci.com/gh/gliderlabs/herokuish) [![IRC Channel](https://img.shields.io/badge/irc-%23gliderlabs-blue.svg)](https://kiwiirc.com/client/irc.freenode.net/#gliderlabs) -[![Docker Hub](https://img.shields.io/badge/docker%20hub-v0.5.9-blue)](https://hub.docker.com/r/gliderlabs/herokuish) +[![Docker Hub](https://img.shields.io/badge/docker%20hub-v0.5.10-blue)](https://hub.docker.com/r/gliderlabs/herokuish) A command line tool for emulating Heroku build and runtime tasks in containers. @@ -19,7 +19,7 @@ Download and uncompress the latest binary tarball from [releases](https://github For example, you can do this directly in your Dockerfiles installing into `/bin` as one step: ``` -RUN curl --location --silent https://github.com/gliderlabs/herokuish/releases/download/v0.5.9/herokuish_0.5.9_linux_x86_64.tgz \ +RUN curl --location --silent https://github.com/gliderlabs/herokuish/releases/download/v0.5.10/herokuish_0.5.10_linux_x86_64.tgz \ | tar -xzC /bin ```