Detect a build is running on Netlify earlier with expanded env var scopes

Until now, the $NETLIFY and $CI environmental variables were only accessible when the build command was run. Now they are accessible during the entire build context, including the set up phases before the build command.

For example, one place where these env vars are now available is in the ignore script. There may be cases where a commit should be built by your CI but not by Netlify. Now you can use the same script in your CI and for your Netlify ignore script and include a check to see if $NETLIFY is true to determine whether the build should go ahead.

Let us know if you find this useful, or what else you are planning to customise with the expanded scope of these variables.