From b3a2dc3c2ff0e92ded89763f9e067359aa9ee22a Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Sat, 10 Apr 2021 16:18:29 +0200 Subject: [PATCH] Small cleanups --- .github/workflows/pull_request_check.yml | 4 ++-- scripts/generateLicenseInfo.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull_request_check.yml b/.github/workflows/pull_request_check.yml index c40d52b..2b99af7 100644 --- a/.github/workflows/pull_request_check.yml +++ b/.github/workflows/pull_request_check.yml @@ -24,8 +24,8 @@ jobs: - name: create stub themes run: "echo '{\"layers\": [], \"themes\": []}' > ./assets/generated/known_layers_and_themes.json" - - name: Compile license info; creates missing_licenses.txt if any missing + - name: Compile license info run: npm run validate:licenses - - name: Compile and validate themes and layers; creates layer_report.txt if any errors are found + - name: Compile and validate themes and layers run: npm run validate:layeroverview diff --git a/scripts/generateLicenseInfo.ts b/scripts/generateLicenseInfo.ts index 95dbbcc..39c96e8 100644 --- a/scripts/generateLicenseInfo.ts +++ b/scripts/generateLicenseInfo.ts @@ -200,12 +200,12 @@ if(process.argv.indexOf("--prompt") >= 0 || process.argv.indexOf("--query") >= 0 } if(missingLicenses.length > 0){ const msg = `There are ${missingLicenses.length} licenses missing.` + console.error(msg) if(process.argv.indexOf("--no-fail") >= 0){ - console.log(msg) + }else if(process.argv.indexOf("--report") >= 0){ writeFileSync("missing_licenses.txt", missingLicenses.join("\n")) } else{ - throw msg } }