summaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorAdriaan de Groot <groot@kde.org>2019-11-21 14:23:00 +0100
committerAdriaan de Groot <groot@kde.org>2019-11-21 14:23:00 +0100
commita0556d1dd720ece5c4ab75026087db5b7ed7b160 (patch)
treebfe7e4ee43fc73eaab05fd8f0a2256ab353363ae /ci
parentbf21e8a4f54464cb114eb247e2dfa0608a132d4e (diff)
CI: enforce 1 week of string freeze
Diffstat (limited to 'ci')
-rw-r--r--ci/txcheck.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/ci/txcheck.sh b/ci/txcheck.sh
index f94f035fd..1fe01c477 100644
--- a/ci/txcheck.sh
+++ b/ci/txcheck.sh
@@ -18,7 +18,12 @@ else
echo "! There are local changes."
exit 1
fi
-# No unsaved changes, collect names of relevant files
+# No unsaved changes; enforce a string freeze of one week
+DATE_PREV=$( git log -1 translation --date=unix | sed -e '/^Date:/s+.*:++p' -e d )
+DATE_HEAD=$( date +%s -d "1 week ago" )
+test "$DATE_PREV" -le "$DATE_HEAD" || { echo "! Translation tag has not aged enough." ; git log -1 translation ; exit 1 ; }
+
+# Tag is good, do real work of checking strings: collect names of relevant files
test -f ".tx/config" || { echo "! No Transifex configuration is present." ; exit 1 ; }
# Print part after = for each source_file line and delete all the rest
TX_FILE_LIST=$( sed -e '/^source_file/s+.*=++p' -e d .tx/config )