diff options
author | 0neGal <mail@0negal.com> | 2024-12-20 01:49:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-20 01:49:06 +0100 |
commit | a8ba1b376ff16a69c52f223341a2ed39fd59a8ea (patch) | |
tree | 2a8c0535a22264f4f3d37d684231d2ac147ac199 /scripts | |
parent | 7403086ce7d2a9d3b68801dc4c2135f5766b8d60 (diff) | |
parent | bd4391f737ee4405fc390ab47c4124fe28df48d7 (diff) | |
download | Viper-a8ba1b376ff16a69c52f223341a2ed39fd59a8ea.tar.gz Viper-a8ba1b376ff16a69c52f223341a2ed39fd59a8ea.zip |
Merge branch 'main' into gamepad-supportgamepad-support
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/langs.js | 12 | ||||
-rwxr-xr-x | scripts/publish.sh | 2 |
2 files changed, 11 insertions, 3 deletions
diff --git a/scripts/langs.js b/scripts/langs.js index 23b9924..b2f5287 100644 --- a/scripts/langs.js +++ b/scripts/langs.js @@ -361,10 +361,18 @@ let check = (logging = true) => { // run `check()` if `--check()` is set if (args["check"]) { - let problems = check(); + let has_problems = false; + + // check localizations, and set `has_problems` depending on whether + // any localization files have problems + Object.values(check()).forEach((item) => { + if (item.length) { + has_problems = true; + } + }); // exit with the correct exit code - if (problems.length) { + if (has_problems) { process.exit(1); } else { process.exit(); diff --git a/scripts/publish.sh b/scripts/publish.sh index bff91df..0a4e51d 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -26,7 +26,7 @@ REMOTEVERSION="$(curl --silent "https://api.github.com/repos/0neGal/viper/releas } -node scripts/langs.js || { +node scripts/langs.js --check || { echo "Please fix localization errors before publishing..." exit 1 } |