sourcecred/scripts
William Chargin f8242c8cab
Don’t erase the `bin/` folder in CI (#317)
Summary:
Previously, our CI script would run `yarn backend`, which has the
side-effect of erasing the `bin/` directory. By itself, this is not
great, but not awful. However, this frequently triggers a race condition
in Prettier, causing the `check-pretty` step of the build to fail. (More
details: https://github.com/prettier/prettier/issues/4468.)

This patch changes the CI script to build the backend scripts into a
temporary directory.

Test Plan:
Before applying this patch: `yarn backend` and then `yarn travis`. If
this consistently causes a Travis failure due to `check-pretty`, then
your machine can reproduce the race condition that we‛re trying to
eliminate. (Otherwise, you can try creating a bunch more Git history…
I’m not really sure what to say. It is a race condition, after all.)
Then, apply this patch, and repeat the above steps; note that the error
no longer occurs, and that the build output is to a temporary directory.

wchargin-branch: ci-preserve-bin
2018-05-29 15:40:42 -07:00
..
backend.js Don’t erase the `bin/` folder in CI (#317) 2018-05-29 15:40:42 -07:00
build.js Turn on flow for scripts/{backend,build,test}.js (#241) 2018-05-08 14:35:56 -07:00
check-stopships.sh Check for STOPSHIPs in CI (#301) 2018-05-25 19:27:31 -07:00
ensure-flow.sh Fix `ensure-flow.sh` running under Node (#314) 2018-05-29 12:20:53 -07:00
start.js Proxy Webpack dev server through to an API server (#245) 2018-05-08 16:09:37 -07:00
test.js Turn on flow for scripts/{backend,build,test}.js (#241) 2018-05-08 14:35:56 -07:00