Skip to content

Commit

Permalink
[fix] commit message of 'make weblate.push.translations'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
return42 committed Oct 4, 2021
1 parent cebc0e3 commit afc5c98
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions manage
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit afc5c98

Please sign in to comment.