Skip to content

Commit

Permalink
Merge pull request #20488 from Expensify/Rory-FixLint
Browse files Browse the repository at this point in the history
[No QA] Fix broken lint
  • Loading branch information
roryabraham authored Jun 9, 2023
2 parents 93a7a3d + f46335d commit 26a2b39
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
6 changes: 1 addition & 5 deletions .github/actions/composite/setupNode/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ runs:
with:
timeout_minutes: 30
max_attempts: 3
command: npm ci --ignore-scripts

- name: Run patch-package
run: npx patch-package
shell: bash
command: npm ci

- name: Install node packages for desktop submodule
if: steps.cache-desktop-node-modules.outputs.cache-hit != 'true'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"private": true,
"scripts": {
"postinstall": "npx patch-package && cd desktop && npm install",
"postinstall": "scripts/postInstall.sh",
"clean": "npx react-native clean-project-auto",
"android": "scripts/set-pusher-suffix.sh && npx react-native run-android --port=8083",
"ios": "scripts/set-pusher-suffix.sh && npx react-native run-ios --port=8082",
Expand Down
16 changes: 16 additions & 0 deletions scripts/postInstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# Go to project root
ROOT_DIR=$(dirname "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)")
cd "$ROOT_DIR" || exit 1

# Run patch-package
npx patch-package

# Install node_modules in subpackages, unless we're in a CI/CD environment,
# where the node_modules for subpackages are cached separately.
# See `.github/actions/composite/setupNode/action.yml` for more context.
if [[ -n ${CI+x} ]]; then
cd desktop || exit 1
npm install
fi

0 comments on commit 26a2b39

Please sign in to comment.