Skip to content

Commit

Permalink
build: remove nuking of node_modules/ in setup.sh (#8245)
Browse files Browse the repository at this point in the history
* build: remove nuking of node_modules/ in setup.sh

* build+ci: add --clean flag to setup.sh to clean node_modules/
  • Loading branch information
Benjozork authored Oct 9, 2023
1 parent 7fbfd11 commit 1592d9a
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
echo VITE_BUILD=false >> .env
- name: Build A32NX
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
./scripts/dev-env/run.sh ./scripts/build_a32nx.sh --no-tty -j 4
- name: Build ZIP files
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ingamepanels-checklist-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
build-ingamepanels-checklist-fix:
# Prevent running this on forks
# Prevent running this on forks
if: github.repository_owner == 'flybywiresim'
name: 'Build InGamePanels Checklist Fix'
runs-on: ubuntu-latest
Expand All @@ -38,7 +38,7 @@ jobs:
echo LOCALAZY_READ_KEY=${{ secrets.LOCALAZY_READ_KEY }} >> .env
- name: Build In-Game Panels Checklist Fix
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
./scripts/dev-env/run.sh ./scripts/build_ingamepanels_checklist_fix.sh --no-tty -j 4
- name: Build ZIP files
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
echo VITE_BUILD=false >> .env
- name: Build A32NX
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
./scripts/dev-env/run.sh ./scripts/build_a32nx.sh --no-tty -j 4
rm -rf fbw-a32nx/src
- name: Build ZIP files
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Checkout source
uses: actions/checkout@v2
- name: install
run: ./scripts/dev-env/run.sh ./scripts/setup.sh
run: ./scripts/dev-env/run.sh ./scripts/setup.sh --clean
- name: npm run lint
run: ./scripts/dev-env/run.sh npm run lint
- name: lint-rust.sh
Expand All @@ -37,7 +37,7 @@ jobs:
- name: Checkout source
uses: actions/checkout@v2
- name: npm install
run: ./scripts/dev-env/run.sh ./scripts/setup.sh
run: ./scripts/dev-env/run.sh ./scripts/setup.sh --clean
- name: npm test
run: npm test
build:
Expand All @@ -62,7 +62,7 @@ jobs:
cat fbw-a32nx/.env
- name: Build A32NX
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
./scripts/dev-env/run.sh ./scripts/build.sh --no-tty -j 4
rm -rf fbw-a32nx/src
- name: Generate install.json
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
echo VITE_BUILD=false >> .env
- name: Build A32NX
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
./scripts/dev-env/run.sh ./scripts/build.sh --no-tty -j 4
- name: Build ZIP file
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
echo VITE_BUILD=false >> .env
- name: Build A32NX
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
./scripts/dev-env/run.sh ./scripts/build.sh --no-tty -j 4
- name: Build ZIP file
run: |
Expand Down
9 changes: 8 additions & 1 deletion scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,12 @@
set -ex

cd /external
rm -rf node_modules

for arg in "$@"; do
if [ "$arg" = "--clean" ]; then
echo "Removing node_modules..."
rm -rf node_modules/
fi
done

npm ci

0 comments on commit 1592d9a

Please sign in to comment.