There's a lot of knowledge to be had about buildpacks. Start with reading the main docs:
- https://devcenter.heroku.com/articles/buildpacks
- https://devcenter.heroku.com/articles/buildpack-api
bash inherently swallows errors thrown by commands. Use the following at the top of your compile script:
#!/usr/bin/env bash
# Fail immediately on non-zero exit code.
set -e
# Fail immediately on non-zero exit code within a pipeline.
set -o pipefail
# Fail on undeclared variables.
set -u
# Debug, echo every command, uncomment for a lot of output
#set -x
You'll need to commit and push to an app that uses a buildpack in order to see it run.
Use empty commits to keep pushing a repo without real changes:
git commit --allow-empty -m "🚢"
git push heroku master
Keep a separate terminal open tailing the app's logs:
heroku logs -t -a my-ddd-app