Ignore formatting diffs when checking for POEditor changes

This commit is contained in:
Deluan 2024-04-11 14:55:53 -04:00
parent 699be19bb9
commit 8720bd154f
1 changed files with 7 additions and 1 deletions

View File

@ -3,6 +3,7 @@
set -e
download_lang() {
filename=resources/i18n/"$1".json
url=$(curl -s -X POST https://poeditor.com/api/ \
-d api_token="${POEDITOR_APIKEY}" \
-d action="export" \
@ -13,7 +14,12 @@ download_lang() {
echo "Failed to export $1"
return 1
fi
curl -sSL "$url" > resources/i18n/"$1".json
curl -sSL "$url" > poeditor.json
if [ "$(jq -c . < $filename)" != "$(jq -c . < poeditor.json)" ]; then
mv poeditor.json "$filename"
else
rm poeditor.json
fi
}
for file in resources/i18n/*.json; do