Add automerge script
This commit is contained in:
parent
be6301511f
commit
de8f4b0a46
1 changed files with 19 additions and 0 deletions
19
scripts/automerge-translations.sh
Normal file → Executable file
19
scripts/automerge-translations.sh
Normal file → Executable file
|
@ -0,0 +1,19 @@
|
|||
#! /bin/bash
|
||||
|
||||
# Automerge translations automatically fetches the translations from weblate
|
||||
|
||||
git remote update weblate-github
|
||||
git merge --no-commit weblate-github/weblate-mapcomplete-layers
|
||||
git merge --no-commit weblate-github/weblate-mapcomplete-layer-translations
|
||||
git merge --no-commit 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 translations and regenerate translations"
|
||||
else
|
||||
echo "Generation of translations failed!"
|
||||
git checkout HEAD
|
||||
fi
|
Loading…
Reference in a new issue