use hashFiles() for faster .po hashing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-02-19 11:34:36 +02:00
parent 3f8c090577
commit ab3e6e931b
@@ -15,9 +15,9 @@ runs:
- name: 🔑 Generate cache key
id: cache-key
shell: bash
env:
PO_HASH: ${{ hashFiles('src/locale/locales/**/messages.po') }}
run: |
# Hash all .po files to detect any translation changes
PO_HASH=$(find src/locale/locales -name "messages.po" -type f -exec cat {} \; | shasum -a 256 | cut -d' ' -f1)
# Get @lingui/cli version to bust cache on compiler upgrades
LINGUI_VERSION=$(grep '"version"' node_modules/@lingui/cli/package.json | head -1 | sed 's/.*"version": "\(.*\)".*/\1/')
CACHE_KEY="translations-${PO_HASH}-lingui-${LINGUI_VERSION}"