by pinguet62

GitHub Readme.md

Heroku Buildpack: Exec

Run custom commands during the build process.


  1. Register buildpack, in correct order.
    Example: heroku buildpacks:add --index 1 https://github.com/pinguet62/heroku-buildpack-exec
  2. Create EXEC_CMD config variable.
    Example: echo 'web: npm start -- --environment prod --port $PORT' > Procfile


  • The script is executed into build folder (see doc)

Output logs

-----> Exec buildpack app detected
-----> "EXEC_CMD" environment variable found
       Executing "EXEC_CMD" command...

where command_logs is the output logs generated by the command.

How it works?

Based on eval command.

In practice, this buildpack execute eval "$EXEC_CMD" command.

Complex command

See https://github.com/weibeld/heroku-buildpack-run