update_snapshots: fix Discourse key check (#1360)

Summary:
This was doing exactly the wrong thing, attempting to update snapshots
whenever the Discourse API token was _not_ present.

Test Plan:
Running `env -u DISCOURSE_TEST_API_KEY ./scripts/update_snapshots.sh`
now successfully updates non-Discourse snapshots, rather than emitting
an error, “Please set the DISCOURSE_TEST_API_KEY environment variable.”.

wchargin-branch: update-snapshots-discourse
This commit is contained in:
William Chargin 2019-09-07 16:27:29 -07:00 committed by GitHub
parent a6a291a3cc
commit fa6697719a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ echo "Updating github/fetchGithubOrgTest.sh"
echo "Updating github/fetchGithubRepoTest.sh"
./src/plugins/github/fetchGithubRepoTest.sh -u --no-build
if [ -z "${DISCOURSE_TEST_API_KEY:-}" ]; then
if [ -n "${DISCOURSE_TEST_API_KEY:-}" ]; then
echo "Updating Discourse API snapshots"
./src/plugins/discourse/update_discourse_api_snapshots.sh
else