New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export PATH to erl/elixir/hex for multi-buildpack scenario #74

Merged
merged 2 commits into from May 15, 2016

Conversation

Projects
None yet
3 participants
@Burgestrand
Copy link
Contributor

Burgestrand commented May 2, 2016

This allows heroku-buildpack-elixir to be used in a multi-buildpack scenario: https://devcenter.heroku.com/articles/buildpack-api#composing-multiple-buildpacks

This PR supersedes #73.

@@ -96,13 +96,23 @@ function pre_compile_hook() {
cd - > /dev/null
}


function write_profile_d_script() {
output_section "Creating .profile.d with env vars"
mkdir -p $build_path/.profile.d

local export_line="export PATH=\$HOME/.platform_tools:\$HOME/.platform_tools/erlang/bin:\$HOME/.platform_tools/elixir/bin:\$PATH

This comment has been minimized.

@Burgestrand

Burgestrand May 2, 2016

Contributor

It feels like this line should be possible to change to use the functions as well, they used to but were changed in 87b98c0 for unknown reasons.

I decided I did not want to mess with this any more than necessary.

@ericmj

This comment has been minimized.

Copy link
Collaborator

ericmj commented May 2, 2016

Does $build_pack_path and $buildpack_dir point to the same directory?

@Burgestrand

This comment has been minimized.

Copy link
Contributor

Burgestrand commented May 2, 2016

I don't know of this $buildpack_dir, are you confusing $build_pack_path and $build_path?

@ericmj

This comment has been minimized.

Copy link
Collaborator

ericmj commented May 2, 2016

The document you linked refers to $buildpack_dir/export.

@Burgestrand

This comment has been minimized.

Copy link
Contributor

Burgestrand commented May 2, 2016

Oh! Yes, they're the same. I used the variable that's used in bin/compile, it's actually passed as $1 in the script but aliased in this buildpack: https://github.com/HashNuke/heroku-buildpack-elixir/blob/master/bin/compile#L9.

@ericmj

This comment has been minimized.

Copy link
Collaborator

ericmj commented May 15, 2016

LGTM. Waiting for @HashNuke to sign-off also.

@HashNuke

This comment has been minimized.

Copy link
Owner

HashNuke commented May 15, 2016

@Burgestrand Nice ~! Looks like the heroku's new export script is very handy. Thank you.
@ericmj LGTM too. Merging right away.

@HashNuke HashNuke merged commit b8c4f82 into HashNuke:master May 15, 2016

@Burgestrand

This comment has been minimized.

Copy link
Contributor

Burgestrand commented May 15, 2016

Sweet! Thanks! :)

@Burgestrand Burgestrand deleted the Burgestrand:kbs-export-path-variables branch May 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment