Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "Export CI=true" do in this create-react-app deploy script?

There's a file called launch.sh in our Create React App, that is used to publish things to the CDN. One of the lines in there says export CI=true. I have no idea what "CI" means in this context, and what it does.

like image 610
Physix Avatar asked Jun 19 '18 13:06

Physix


1 Answers

Read the docs, as ever: https://facebook.github.io/create-react-app/docs/running-tests#continuous-integration

Continuous Integration

By default npm test runs the watcher with interactive CLI. However, you can force it to run tests once and finish the process by setting an environment variable called CI.

When creating a build of your application with npm run build linter warnings are not checked by default. Like npm test, you can force the build to perform a linter warning check by setting the environment variable CI. If any warnings are encountered then the build fails.

[...]

like image 168
Alastair Maw Avatar answered Oct 11 '22 09:10

Alastair Maw