Why changing heroku buildpack for existing app doesn't run bin/release
buildpack, heroku, release, slug
Solution
You are correct in your assumption, the `addons` and `config_vars` properties of `bin/release` are only taken from a buildpack on an app's first deploy. See https://devcenter.heroku.com/articles/buildpack-api#binrelease for more details.
Heroku is moving over to a new system for a buildpack to add config vars that will work beyond an app's first deploy: https://devcenter.heroku.com/articles/labs-dot-profile-d
If a buildpack copies a `.profile.d/buildpack_name.sh` into the app, that file will be sourced during application boot. This can be used to set up things like the `PATH`.
Problem
I had a php app on heroku with the default buildpack (apache), and then decided to change it to the php-fpm + nginx buildpack (https://github.com/iphoting/heroku-buildpack-php-tyler/). I issued the change command: ``` heroku config:set BUILDPACK_URL=https://github.com/iphoting/heroku-buildpack-php-tyler.git ``` And pushed with: ``` git push heroku master ``` The slug then compiles, but all the binaries fail to execute with "command not found", because PATH config variable which should be updated with bin/release isn't updated. In comparison, when creating an app from scratch with this buildpack with ``` heroku create -b https://github.com/iphoting/heroku-buildpack-php-tyler.git ``` Everything runs as expected (and PATH is present and updated). My assumption is that bin/release was not run after changing the config variable BUILDPACK_URL, and therefore the PATH variable isn't set. In order to make the app work, I had to manually add the PATH config variable. Did anybody else ever encounter this? Is this the expected behavior? By my understanding, bin/release should always run after a slug compile? EDIT: corrected the git url to the correct ".git" one