Ignore formatting diffs when checking for POEditor changes

This commit is contained in:
Deluan 2024-04-11 14:55:53 -04:00 committed by Joe Stump
parent b1cb023168
commit c13e1d7d4a
No known key found for this signature in database
GPG Key ID: 29151C3EC48A0EB9

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