Skip to content

Commit

Permalink
check if po files changed
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulMelody committed Jun 30, 2024
1 parent 30c4448 commit 602c8f5
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/compile_catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,25 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Check diff
run: |
REGEXP="^libresvip/.*\.po$"
PO_CHANGED_COUNT=$(git show --name-only | grep "$REGEXP" | wc -l)
PO_CHANGED=$([[ PO_CHANGED_COUNT -gt 0 ]] && echo "true" || echo "false")
echo "::set-output name=po_changed::$PO_CHANGED"
- name: Set up Python
if: ${{ steps.check-diff.outputs.po_changed == 'true' }}
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install babel
run: pip install babel setuptools

- name: Compile catalogs
if: ${{ steps.check-diff.outputs.po_changed == 'true' }}
run: |
pip install babel setuptools
cd scripts
python batch_compile_catalog.py
Expand Down

0 comments on commit 602c8f5

Please sign in to comment.