heroku / heroku-buildpack-static

[DEPRECATED] Heroku buildpack for handling static sites and single page web apps
MIT License
675 stars 427 forks source link

Buildpack compile fixes and refactoring #177

Closed edmorley closed 3 years ago

edmorley commented 3 years ago

In order to reduce the size of the Heroku-20 support PR, I've split out some of the compile fixes/cleanup.

The most notable of these are:

See the individual commit messages (and changelog entries) for more details.

Refs W-8367040.

edmorley commented 3 years ago

Example build on this branch using Heroku-18:

remote: Building source:
remote:
remote: -----> Static HTML app detected
remote: -----> Installed nginx 1.9.7 to /app/bin
remote: -----> Discovering process types
remote:        Procfile declares types     -> (none)
remote:        Default types for buildpack -> web
remote:
remote: -----> Compressing...
remote:        Done: 845.7K
remote: -----> Launching...
remote:        Released v6

And with the not-yet-supported Heroku-20 we now get a nicer build time error and not a boot failure at runtime:

remote: Building source:
remote:
remote: -----> Static HTML app detected
remote: Stack heroku-20 is not supported!
remote:  !     Push rejected, failed to compile Static HTML app.
remote:
remote:  !     Push failed