From a63ba6bc4fdd93e010ded82664a19e5ba16d2ac9 Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Sat, 28 Jan 2017 23:02:26 +0100 Subject: [PATCH] Update translations before merging branches --- release-tool | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/release-tool b/release-tool index 282b4db01..2e3dad3d6 100755 --- a/release-tool +++ b/release-tool @@ -232,6 +232,13 @@ checkChangeLog() { fi } +checkTransifexCommandExists() { + command -v tx > /dev/null + if [ 0 -ne $? ]; then + exitError "Transifex tool 'tx' not installed! Please install it using 'pip install transifex-client'" + fi +} + trap exitTrap SIGINT SIGTERM @@ -308,6 +315,7 @@ merge() { logInfo "Changing to source directory..." cd "${SRC_DIR}" + checkTransifexCommandExists checkGitRepository checkReleaseDoesNotExist checkWorkingTreeClean @@ -317,6 +325,25 @@ merge() { checkChangeLog logInfo "All checks pass, getting our hands dirty now!" + + logInfo "Checking out source branch..." + git checkout "$SOURCE_BRANCH" + + logInfo "Updating language files..." + ./share/translations/update.sh + if [ 0 -ne $? ]; then + exitError "Updating translations failed!" + fi + git diff-index --quiet HEAD -- + if [ $? -ne 0 ]; then + git add ./share/translations/* + logInfo "Committing changes..." + if [ "" == "$GPG_GIT_KEY" ]; then + git commit -m "Update translations" + else + git commit -m "Update translations" -S"$GPG_GIT_KEY" + fi + fi logInfo "Checking out target branch '${TARGET_BRANCH}'..." git checkout "$TARGET_BRANCH" @@ -440,6 +467,8 @@ build() { checkWorkingTreeClean checkOutputDirDoesNotExist + logInfo "All checks pass, getting our hands dirty now!" + logInfo "Checking out release tag '${TAG_NAME}'..." git checkout "$TAG_NAME"