From 9d98761ad9cee99f527417761f20ce29bf6cdd50 Mon Sep 17 00:00:00 2001 From: HackerNCoder Date: Sat, 11 Feb 2023 02:56:03 +0100 Subject: [PATCH] skip if PO-Revision-Date is less than last CI created time --- .po2tl.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.po2tl.sh b/.po2tl.sh index 66a01b7..48864af 100755 --- a/.po2tl.sh +++ b/.po2tl.sh @@ -20,6 +20,10 @@ for file in ./translations-*.po; do continue fi + if (( $(date -d $(awk '/PO-Revision-Date/{print $2}' ${file} +%s)) < $CI_PREV_BUILD_CREATED )); then + continue + fi + msgfmt "$file" -o game.mo PATH=$(pwd)/renpy:${PATH} RENPY_DIR=$(pwd)/renpy python3 rttk-queerscriptors/mo2tl.py $(pwd)/game-source game.mo ${lang} zip "${lang}.zip" game-source/game/tl/${lang}/*