Skip to content

Commit

Permalink
FIX: Only commit real changes to the .pot file
Browse files Browse the repository at this point in the history
Ignore when only the timestamp changed
  • Loading branch information
amilcarlucas committed Jan 18, 2025
1 parent d247dae commit 867523b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/i18n-extract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,13 @@ jobs:
git config user.name "github-actions[bot]"
git add $PYGETTEXT_LOCALEDIR/$PYGETTEXT_DOMAIN.pot
if [ -n "$(git status --porcelain)" ]; then
git commit -m "CHORE: Extracted i18n strings"
git push
CHANGED_LINES=$(git diff --staged | grep -E "^[\+\-]" | wc -l)
if [ $CHANGED_LINES -gt 2 ]; then
git commit -m "CHORE: Extracted i18n strings to $PYGETTEXT_LOCALEDIR/$PYGETTEXT_DOMAIN.pot"
git push
else
echo "Not enough changes to commit (only $CHANGED_LINES lines changed)"
fi
else
echo "No changes to commit"
fi
fi

0 comments on commit 867523b

Please sign in to comment.