mapcomplete/scripts/automerge-translations.sh

17 lines
No EOL
560 B
Bash
Executable file

#! /bin/bash
# Automerge translations automatically fetches the translations from weblate
git fetch weblate-github
git merge --no-commit weblate-github/weblate-mapcomplete-layers weblate-github/weblate-mapcomplete-layer-translations weblate-github/weblate-mapcomplete-core
npm run generate:translations
if [ "$?" = "0" ]; then
# Translation generation went fine - commit
git add langs/
git add assets/
git commit -m "Merge weblate trangsslations and regenerate translations"
else
echo "Generation of translations failed!"
git checkout HEAD
fi