-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix] make weblate.push.translations #379
Conversation
Even when there are changes, the function exit without pushing them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to fix the issue / lets merge and see if it works in practice ..
Sorry, this was my fail, I fixed #293 (comment)
It works: 7d9ffd6 |
Remote weblate (https://weblate.bubu1.eu/git/searxng/searxng/) before::
after:
May be we can fix the Line 304 in cebc0e3
An alternative might be: diff --git a/manage b/manage
index e3bf27b50..deefd482c 100755
--- a/manage
+++ b/manage
@@ -240,7 +240,7 @@ weblate.push.translations() {
# 5. Notify Weblate to pull updated 'master' & 'translations' branch.
local messages_pot diff_messages_pot last_commit_hash last_commit_detail \
- last_commit_message exitcode
+ exitcode
messages_pot="${TRANSLATIONS_WORKTREE}/searx/translations/messages.pot"
( set -e
pyenv.activate
@@ -301,11 +301,12 @@ weblate.push.translations() {
# git add/commit/push
last_commit_hash=$(git log -n1 --pretty=format:'%h')
last_commit_detail=$(git log -n1 --pretty=format:'%h - %as - %aN <%ae>' "${last_commit_hash}")
- last_commit_message="[translations] update messages.pot and messages.po files\nFrom ${last_commit_detail}"
pushd "${TRANSLATIONS_WORKTREE}"
git add searx/translations
- git commit -m "${last_commit_message}"
+ git commit \
+ -m "[translations] update messages.pot and messages.po files" \
+ -m "From ${last_commit_detail}"
git push
popd |
Fix `\n` issue in the commit message [1] by using multiple `-m` options [2]:: 7d9ffd6 translations [translations] update messages.pot and messages.po files\nFrom cebc0e3 - 2021-10-04 - Markus Heiser <markus.heiser@darmarIT.de> [1] searxng#379 (comment) [2] https://git-scm.com/docs/git-commit#Documentation/git-commit.txt--mltmsggt Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
What does this PR do?
Even when there are changes, the function exit without pushing them.
Not tested, see log:
https://github.com/searxng/searxng/runs/3783399235?check_suite_focus=true#step:6:235
Extract:
The log stops without anymore.
Which lead me to think this condition is always true:
searxng/manage
Lines 269 to 271 in 47eb836
This PR change line 269 to
Local dumb tests:
Why is this change important?
Bug fix
How to test this PR locally?
Author's checklist
Related issues