From b70e5d7e0f424bc4655e474ea957481ea3797195 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 28 Nov 2019 15:58:02 +0100 Subject: [PATCH] CI: allow cleaning up a string-freeze-check independently --- ci/txcheck.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/ci/txcheck.sh b/ci/txcheck.sh index 46b9959c1..a28caaee9 100644 --- a/ci/txcheck.sh +++ b/ci/txcheck.sh @@ -5,6 +5,23 @@ # a translations push, which works for the current development # workflow .. but it could be improved by looking for one of # the typical txpush log messages instead of the tag. +# +# Use --cleanup as an argument to clean things up. + +tx_cleanup() +{ + # Cleanup artifacs of checking + git worktree remove --force build-txcheck-head + git worktree remove --force build-txcheck-prev + git branch -D build-txcheck-head > /dev/null 2>&1 +} + +if test "x$1" = "x--cleanup" ; then + tx_cleanup + exit 0 +fi +test -z "$1" || { echo "! Usage: txcheck.sh [--cleanup]" ; exit 1 ; } + if git describe translation > /dev/null 2>&1 ; then : else @@ -63,9 +80,6 @@ else exit 1 fi -# Cleanup artifacs of checking -git worktree remove --force build-txcheck-head -git worktree remove --force build-txcheck-prev -git branch -D build-txcheck-head > /dev/null 2>&1 +tx_cleanup exit 0