Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pinguet62/heroku-buildpack-exec

:runner: Heroku buildpack to execute Shell command during build process
https://github.com/pinguet62/heroku-buildpack-exec

heroku heroku-buildpack

Last synced: 13 days ago
JSON representation

:runner: Heroku buildpack to execute Shell command during build process

Awesome Lists containing this project

README

        

# Heroku Buildpack: Exec

Run custom commands during the build process.

## Usage

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`

## Notes

* The script is executed into _build_ folder (see [doc](https://devcenter.heroku.com/articles/buildpack-api#bin-compile))

## Output logs

```log
-----> 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