From 36b2a87a063af8d265fa787b408ba38761bc4276 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Thu, 14 Aug 2025 00:58:42 +0300 Subject: [PATCH] Skip `intl:compile` if not needed (#8837) * skip intl compile if not needed * add intl:compile to pull request ci * compile -> build just to match others --- .github/workflows/pull-request-commit.yml | 3 ++- package.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request-commit.yml b/.github/workflows/pull-request-commit.yml index 53e3cc9983..8c48b54db0 100644 --- a/.github/workflows/pull-request-commit.yml +++ b/.github/workflows/pull-request-commit.yml @@ -50,6 +50,7 @@ jobs: git config --global user.name "github-actions[bot]" git merge --no-edit ${{ github.head_ref }} yarn install + yarn intl:build - name: 🔦 Generate stats file for PR run: | @@ -73,6 +74,7 @@ jobs: if: ${{ !steps.get-base-stats.outputs.cache-hit }} run: | yarn install + yarn intl:build yarn generate-webpack-stats-file mv stats.json stats-base.json @@ -143,4 +145,3 @@ jobs: with: header: fingerprint-diff delete: true - diff --git a/package.json b/package.json index b0c0b36827..202656a60f 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ }, "scripts": { "prepare": "is-ci || husky install", - "postinstall": "patch-package && yarn intl:compile", + "postinstall": "patch-package && yarn intl:compile-if-needed", "prebuild": "expo prebuild --clean", "android": "expo run:android", "android:prod": "expo run:android --variant release", @@ -58,6 +58,7 @@ "intl:extract": "lingui extract --clean --locale en", "intl:extract:all": "lingui extract --clean", "intl:compile": "lingui compile", + "intl:compile-if-needed": "is-ci || [ -f src/locale/locales/en/messages.js ] || yarn intl:compile", "intl:pull": "crowdin download translations --verbose -b main", "intl:push": "crowdin push translations --verbose -b main", "nuke": "rm -rf ./node_modules && rm -rf ./ios && rm -rf ./android",