mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-05 22:26:07 +00:00
Add script for preparing translations
This commit is contained in:
11
script/release/prepare
Executable file
11
script/release/prepare
Executable 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
23
script/release/update_locales
Executable 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
|
||||
Reference in New Issue
Block a user