{"id":18532185,"url":"https://github.com/weibeld/heroku-buildpack-run","last_synced_at":"2025-04-09T14:31:25.032Z","repository":{"id":29291608,"uuid":"32824431","full_name":"weibeld/heroku-buildpack-run","owner":"weibeld","description":"Run custom commands during the build of a Heroku app","archived":false,"fork":false,"pushed_at":"2020-09-27T14:40:29.000Z","size":46,"stargazers_count":73,"open_issues_count":0,"forks_count":105,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T07:56:58.404Z","etag":null,"topics":["buildpack","heroku","heroku-buildpack"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weibeld.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-24T20:50:31.000Z","updated_at":"2024-11-06T01:07:39.000Z","dependencies_parsed_at":"2022-09-15T18:02:39.621Z","dependency_job_id":null,"html_url":"https://github.com/weibeld/heroku-buildpack-run","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weibeld%2Fheroku-buildpack-run","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weibeld%2Fheroku-buildpack-run/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weibeld%2Fheroku-buildpack-run/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weibeld%2Fheroku-buildpack-run/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weibeld","download_url":"https://codeload.github.com/weibeld/heroku-buildpack-run/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248055104,"owners_count":21040122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["buildpack","heroku","heroku-buildpack"],"created_at":"2024-11-06T19:04:53.738Z","updated_at":"2025-04-09T14:31:24.747Z","avatar_url":"https://github.com/weibeld.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Heroku Buildpack: Run\n\nRun custom commands during the build process.\n\n## Description\n\nThis buildpack allows specifying custom scripts or other commands that will be run during the build process. If any command exits with a non-zero status code, the build is aborted.\n\n## Usage\n\n### Using the `buildpack-run.sh` script\n\nBy default, the buildpack looks for a script named `buildpack-run.sh` in the root directory of your app. So, you can do the following:\n\n```bash\necho -e '#!/bin/bash\\necho \"Hello World\"' \u003ebuildpack-run.sh\nchmod +x buildpack-run.sh\ngit add buildpack-run.sh \u0026\u0026 git commit\ngit push heroku master\n```\n\nThe above example will print `Hello World` during the build.\n\n### Using the `BUILDPACK_RUN` config variable\n\nAlternatively to using `buildpack-run.sh`, you can specify custom commands in the `BUILDPACK_RUN` config variable:\n\n```bash\nheroku config:set BUILDPACK_RUN='echo \"Hello World\"\n```\n\nThe above example will print `Hello World` during the build.\n\nYou can also specify multiple commands by separating them with colons:\n\n```bash\nheroku config:set BUILDPACK_RUN='echo \"Hello World\":uname -a:./myscript.sh foo bar\n```\n\nIn the above example, the buildpack will execute the following commands in sequence:\n\n1. `echo \"Hello World\"`\n1. `uname -a`\n1. `./myscript.sh foo bar`\n\n## Loading config variables\n\nBy default, the app's [config variables](https://devcenter.heroku.com/articles/config-vars) are only available as files in a specific directory in the build environment (see [`ENV_DIR`](#default-environment-variables) below). You can load all these config variables as environment variables by setting the `BUILDPACK_RUN_LOAD_CONFIG` config variable:\n\n```bash\nheroku config:set BUILDPACK_RUN_LOAD_CONFIG=1\n```\n\nNow, all the app's config variables will be available to your commands as environment variables.\n\nIf you want to prevent certain config variables from being loaded as environment variables (for example, to prevent overwriting native environment variables), you can specify them in the `BUILDPACK_RUN_LOAD_CONFIG_SKIP` config variable (separated by colons):\n\n```bash\nheroku config:set BUILDPACK_RUN_LOAD_CONFIG_SKIP=FOO:BAR:BAZ\n```\n\nIn the above example, the config variables named `FOO`, `BAR`, and `BAZ` will _not_ be loaded as environment variables. Note that this may be especially useful for config variables like `PATH` that you might _not_ want to overwrite in the build environment.\n\n## Default environment variables\n\nThe following special environment variables are always available to your commands:\n\n- `BUILD_DIR`: your app's root directory in the build environment \n- `CACHE_DIR`: directory that persists between builds and can be used as a cache\n- `ENV_DIR`: directory containing the app's config variables as files\n\n## License\n\nLicensed under the MIT License. See [LICENSE.md](LICENSE.md) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweibeld%2Fheroku-buildpack-run","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweibeld%2Fheroku-buildpack-run","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweibeld%2Fheroku-buildpack-run/lists"}