mapcomplete/scripts/automerge-translations.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
578 B
Bash
Raw Normal View History

2022-07-26 17:16:32 +02:00
#! /usr/bin/env bash
2022-06-03 01:53:16 +02:00
# 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