Add script for preparing translations

This commit is contained in:
David Cook
2023-11-09 17:24:41 +11:00
parent ec1f23a947
commit f754eac3a0
3 changed files with 34 additions and 0 deletions

11
script/release/prepare Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
# Execute preparation tasks for a regular patch release. Requires admin permission on the repo.
#
set -e
# Download translations and push to master
$(dirname "$0")/update_locales
# Bump the patch version and push the tag
$(dirname "$0")/tag

23
script/release/update_locales Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/sh
# Download and commit the latest Transifex translations
#
# Exit on error or uncommitted changes
# TODO: check that master matches upstream/master
set -e
if [ ! -z "$(git status --porcelain)" ]; then
echo "Aborted: git working directory is not clean."
exit 1
fi
echo "\n*** Checking out latest master... ***\n"
git checkout master
git pull upstream master
echo "\n*** Downloading latest Transifex translations... ***\n"
tx pull --force
git commit -a -m "Update all locales with the latest Transifex translations"
echo "\n*** Pushing to master... ***\n"
git push upstream master