From fa466b447cb7e52d815247277d4ce57e7305e82b Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 25 Jan 2020 17:31:55 +0100 Subject: [PATCH] CI: Canonicalize XML first - Do XML processing / canonicalisation in txpush only - Run the *HEAD* version of txpush in both worktrees --- ci/txcheck.sh | 12 ++++-------- ci/txpush.sh | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/ci/txcheck.sh b/ci/txcheck.sh index 7f85be970..73092adea 100644 --- a/ci/txcheck.sh +++ b/ci/txcheck.sh @@ -71,19 +71,15 @@ done # The state of translations tx_sum() { + CURDIR=`pwd` WORKTREE_NAME="$1" WORKTREE_TAG="$2" git worktree add $WORKTREE_NAME $WORKTREE_TAG > /dev/null 2>&1 || { echo "! Could not create worktree." ; exit 1 ; } - ( cd $WORKTREE_NAME && sh ci/txpush.sh --no-tx ) > /dev/null 2>&1 || { echo "! Could not re-create translations." ; exit 1 ; } - # Clean up the TS (XML) files (like txpush would) - TS_FILE="$WORKTREE_NAME/lang/calamares_en.ts" - if test -n "$XMLLINT" ; then - $XMLLINT --format --encode utf-8 -o "$TS_FILE".new "$TS_FILE" && mv "$TS_FILE".new "$TS_FILE" - fi - sed -i'' -e '/ /dev/null 2>&1 || { echo "! Could not re-create translations." ; exit 1 ; } - # Remove linenumbers from .pot + # Remove linenumbers from .ts (XML) and .pot + sed -i'' -e '/