mapcomplete/scripts/automerge-translations.sh

19 lines
570 B
Bash
Raw Normal View History

2022-06-03 01:53:16 +02:00
#! /bin/bash
# Automerge translations automatically fetches the translations from weblate
2022-06-03 02:02:14 +02:00
git fetch weblate-github
git merge --no-commit weblate-github/weblate-mapcomplete-layers weblate-github/weblate-mapcomplete-layer-translations weblate-github/weblate-mapcomplete-core
2022-06-03 01:53:16 +02:00
npm run generate:translations
if [ "$?" = "0" ]; then
# Translation generation went fine - commit
git add langs/
git add assets/
git commit -m "Merge weblate translations and regenerate translations"
git push
2022-06-03 01:53:16 +02:00
else
echo "Generation of translations failed!"
git merge --abort
fi