summaryrefslogtreecommitdiff
path: root/utils/lib_sxng_weblate.sh
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2025-12-04 14:07:22 +0100
committerGitHub <noreply@github.com>2025-12-04 14:07:22 +0100
commit5e0e1c6b31827c640cce901b3bb615da38c084dd (patch)
tree6cada05d2c58b007c28e5de12fe81aec89e3d38e /utils/lib_sxng_weblate.sh
parent3c7545c6ce3fbe40b47d242b84f21f133e1179fe (diff)
[debug] CI - add debug to trace issue #5490 (#5519)
The error only occurs in the CI action, which is why we need to commit the coded debug. As soon as the bug is identified and fixed, this commit can be reverted / the ``set -x`` can be removed from the code. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'utils/lib_sxng_weblate.sh')
-rwxr-xr-xutils/lib_sxng_weblate.sh18
1 files changed, 12 insertions, 6 deletions
diff --git a/utils/lib_sxng_weblate.sh b/utils/lib_sxng_weblate.sh
index 6aa71cd65..1ffee8bf3 100755
--- a/utils/lib_sxng_weblate.sh
+++ b/utils/lib_sxng_weblate.sh
@@ -25,8 +25,7 @@ weblate.translations.worktree() {
git remote add weblate https://translate.codeberg.org/git/searxng/searxng/
fi
if [ -d "${TRANSLATIONS_WORKTREE}" ]; then
- pushd .
- cd "${TRANSLATIONS_WORKTREE}"
+ pushd "${TRANSLATIONS_WORKTREE}"
git reset --hard HEAD
git pull origin translations
popd
@@ -60,6 +59,8 @@ weblate.to.translations() {
wlc pull
wlc commit
+ set -x # https://github.com/searxng/searxng/issues/5490
+
# get the translations in a worktree
weblate.translations.worktree
@@ -85,12 +86,14 @@ weblate.translations.commit() {
# lock change on weblate
wlc lock
+ set -x # https://github.com/searxng/searxng/issues/5490
+
# get translations branch in git worktree (TRANSLATIONS_WORKTREE)
weblate.translations.worktree
- existing_commit_hash=$(
- cd "${TRANSLATIONS_WORKTREE}"
- git log -n1 --pretty=format:'%h'
- )
+
+ pushd "${TRANSLATIONS_WORKTREE}"
+ existing_commit_hash=$(git log -n1 --pretty=format:'%h')
+ popd
# pull weblate commits
weblate.to.translations
@@ -147,6 +150,9 @@ weblate.push.translations() {
(
set -e
pyenv.activate
+
+ set -x # https://github.com/searxng/searxng/issues/5490
+
# get translations branch in git worktree (TRANSLATIONS_WORKTREE)
weblate.translations.worktree