Skip to content

Config merging; build environment variables #6

merged 2 commits into from Jul 7, 2012

3 participants


This commit includes two separate but related features:

  1. Instead of only taking the last release config, the YAML is parsed and merged after each step. It's quite dumb now, just a "deep merge" on the values emitted by each step, but could be upgraded to even, say, merge "PATH" settings, etc.

  2. It adds awareness for a custom key in bin/release's yaml: build_env. It's like config_vars, except that each stage in a multi-build is run with the combined build_env of each previous step.

I'd like some feedback on this, but here's my use case:

I needed libcairo (with development dependencies), which isn't available on heroku. So I put together a buildpack for it, but realized there was no way to pass information from my buildpack into the ruby build pack for installing the "cairo" gem.

So now my cairo buildpack now does this in bin/release:

# bin/release <build-dir>

set -e



cat << EOF
  BUNDLE_BUILD__CAIRO: "--with-opt-lib=${LIB_PATH} --with-opt-include=${INCLUDE_PATH} --with-pkg-config=${PKG_CONFIG_PATH}"
  PATH: "bin:/app/vendor/cairo/bin:/usr/local/bin:/usr/bin:/bin"

So that a user can do a multi-build pack with cairo + ruby, do 'gem "cairo"', and everything just works!

bernerdschaefer added some commits Jul 6, 2012
@bernerdschaefer bernerdschaefer Give bin/compile arguments meaningful names c89fa1d
@bernerdschaefer bernerdschaefer Merge release configurations for each framework
Also adds support for a 'build_env' key in the release yaml for updating
the config used on the build server.
@ddollar ddollar merged commit 35ae1fe into ddollar:master Jul 7, 2012
ddollar commented Jul 7, 2012

This is awesome, thanks!

@ddollar ddollar added a commit that referenced this pull request Jul 10, 2012
@ddollar Revert "Merge pull request #6 from bernerdschaefer/build-env-with-con…

This reverts commit 35ae1fe, reversing
changes made to 69f4e67.

What triggered the revert? Just curious..

ddollar commented Jul 13, 2012


@tomjack tomjack pushed a commit to loku/heroku-buildpack-multi that referenced this pull request Jul 16, 2012
Tom Jack Revert "Revert "Merge pull request #6 from bernerdschaefer/build-env-…

This reverts commit 2a4cefc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.