Skip to content

Commit

Permalink
Trigger a Weblate reset after pushing translations
Browse files Browse the repository at this point in the history
After we have told Weblate to push all of its pending commits, it should
forget about them.

The reason is that we may revert some code samples, and when the
translations PR finally squash-merges its way onto `main` and gets back
to Weblate, it will see a conflict with its own pending changes.

By resetting, it will forget about its own pending changes, and think
we are just great upstream translators!
  • Loading branch information
rix0rrr committed Apr 1, 2024
1 parent eaa782a commit 1a78f45
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/update-weblate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,17 @@ jobs:
echo '[keys]' >> .weblate
echo 'https://hosted.weblate.org/api/ = ${{ secrets.WEBLATE_API_KEY }}' >> .weblate
- name: Weblate commands
# Do a weblate pull, commit and push.
# After pushing, clean the Weblate remote. This is necessary because we squash merge the
# commits that Weblate pushes, and if the bytes aren't exactly equivalent (for example
# if we wrap or we revert a broken bit of code) it will trigger a merge
# conflict.
run: |
set -x
wlc repo
wlc pull
wlc commit
wlc push
wlc reset

0 comments on commit 1a78f45

Please sign in to comment.