diff --git a/script/release/prepare b/script/release/prepare new file mode 100755 index 0000000000..cfc16b0577 --- /dev/null +++ b/script/release/prepare @@ -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 diff --git a/script/tag_release b/script/release/tag similarity index 100% rename from script/tag_release rename to script/release/tag diff --git a/script/release/update_locales b/script/release/update_locales new file mode 100755 index 0000000000..186ea1c262 --- /dev/null +++ b/script/release/update_locales @@ -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