post_compile puts revision.txt only in the dist/ directory, however when SERVE_MINIFIED_UI is unset, files are served from the ui/ directory instead. This means on later deploys, when pre_deploy tries to fetch "$SITE_URL/revision.txt" (in order to generate a GitHub compare URL for the New Relic deploy reporting), it gets s 404, causing the deploy step to abort, preventing the deployment. Workaround is to set both `SKIP_PREDEPLOY=1` and unset `SERVE_MINIFIED_UI` at the same time. Fix is just to make sure revision.txt is in both ui/ and dist/.
Created attachment 8788578 [details] [review] [treeherder] mozilla:heroku-revision-txt > mozilla:master
Comment on attachment 8788578 [details] [review] [treeherder] mozilla:heroku-revision-txt > mozilla:master lgtm, assuming you've tested it. :)
Commit pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/0a0a0b78f004e3055ac4b0b3cd0882a5bea1d5e2 Bug 1299443 - Fix revision.txt on Heroku when SERVE_MINIFIED_UI is unset Previously `<site-root>/revision.txt` would 404 if `SERVE_MINIFIED_UI` was unset on Heroku, which would then cause the next deploy to fail. It's now made available in both the `ui/` and `dist/` directories, so it can be found regardless of the value of `SERVE_MINIFIED_UI`.
Yeah tested on heroku-stage earlier - thank you for the review :-)