|
1 | 1 | #!/usr/bin/env bash
|
2 | 2 | # Usage: bin/compile <build-dir> <cache-dir> <env-dir>
|
3 | 3 | # See: https://devcenter.heroku.com/articles/buildpack-api
|
| 4 | +# shellcheck disable=SC2250 # TODO: Use braces around variable references even when not strictly required. |
4 | 5 |
|
5 | 6 | set -euo pipefail
|
6 | 7 |
|
|
131 | 132 | if [[ -f "$CACHE_DIR/.heroku/python-stack" ]]; then
|
132 | 133 | CACHED_PYTHON_STACK=$(cat "$CACHE_DIR/.heroku/python-stack")
|
133 | 134 | else
|
| 135 | + # shellcheck disable=SC2154 # TODO: Env var is referenced but not assigned. |
134 | 136 | CACHED_PYTHON_STACK=$STACK
|
135 | 137 | fi
|
136 | 138 |
|
@@ -170,6 +172,7 @@ mkdir -p /app/.heroku/src
|
170 | 172 | # symlinks to emulate that we are operating in `/app` during the build process.
|
171 | 173 | # This is (hopefully obviously) because apps end up running from `/app` in production.
|
172 | 174 | # Realpath is used to support use-cases where one of the locations is a symlink to the other.
|
| 175 | +# shellcheck disable=SC2312 # TODO: Invoke this command separately to avoid masking its return value. |
173 | 176 | if [[ "$(realpath "${BUILD_DIR}")" != "$(realpath /app)" ]]; then
|
174 | 177 | # python expects to reside in /app, so set up symlinks
|
175 | 178 | # we will not remove these later so subsequent buildpacks can still invoke it
|
@@ -231,6 +234,7 @@ meta_time "nltk_downloader_duration" "${nltk_downloader_start_time}"
|
231 | 234 | # Support for editable installations.
|
232 | 235 | # In CI, $BUILD_DIR is /app.
|
233 | 236 | # Realpath is used to support use-cases where one of the locations is a symlink to the other.
|
| 237 | +# shellcheck disable=SC2312 # TODO: Invoke this command separately to avoid masking its return value. |
234 | 238 | if [[ "$(realpath "${BUILD_DIR}")" != "$(realpath /app)" ]]; then
|
235 | 239 | rm -rf "$BUILD_DIR/.heroku/src"
|
236 | 240 | deep-cp /app/.heroku/src "$BUILD_DIR/.heroku/src"
|
|
0 commit comments