Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
Fail the build early on unsupported stacks
Browse files Browse the repository at this point in the history
In order to prevent the build completing apparently successfully, but
the app fail to boot at runtime due to stack incompatibility.

At first glance this would seem unnecessary due to the stack-specific
URL meaning the `curl` would 404 on supported stacks. However #165
means the Cedar-14 binary is installed on all stacks, and on Heroku-20
causes the failures at runtime seen in #166.

Future PRs will fix the curl/binary handling to use stack-specific URLs,
however it's still nicer to explicitly handle unsupported stacks with a
clear error message than a 404.
  • Loading branch information
edmorley committed Nov 7, 2020
1 parent dc48c04 commit 3d6b342
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

* [#177](https:/heroku/heroku-buildpack-static/pull/177) Fail the build early on unsupported stacks

## v4 (2019-09-18)

Expand Down
10 changes: 10 additions & 0 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ cache_dir=$2
env_dir=$3
bp_dir=$(dirname $(dirname $0))

case "${STACK}" in
cedar-14|heroku-16|heroku-18)
# Supported stack
;;
*)
echo "Stack ${STACK} is not supported!"
exit 1
;;
esac

fetch_nginx_tarball() {
local version="1.9.7"
local tarball_file="nginx-$version.tgz"
Expand Down

0 comments on commit 3d6b342

Please sign in to comment.