From 4559d560e940a721a862179d56bdfbdaa240013f Mon Sep 17 00:00:00 2001 From: adamczykm Date: Tue, 30 Apr 2024 23:50:58 +0200 Subject: [PATCH] Add a hack to build client faster --- .github/workflows/build-smart-on-pr.yaml | 11 +++++++++-- minauth-demo/minauth-demo-client/package.json | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-smart-on-pr.yaml b/.github/workflows/build-smart-on-pr.yaml index 052ea71..98fa372 100644 --- a/.github/workflows/build-smart-on-pr.yaml +++ b/.github/workflows/build-smart-on-pr.yaml @@ -50,8 +50,15 @@ jobs: for package in "${packages[@]}"; do echo "Building package: ${package}" cd $package - npm install-ci - npm run build + if [[ "${package}" == "./minauth-demo/minauth-demo-client" ]]; then + echo "Running special build command for minauth-demo-client" + # Special command for minauth-demo-client + npm run dev-kill + else + # Standard build commands for other packages + npm install-ci + npm run build + fi cd - done shell: bash diff --git a/minauth-demo/minauth-demo-client/package.json b/minauth-demo/minauth-demo-client/package.json index 503b5e4..a2e82c6 100644 --- a/minauth-demo/minauth-demo-client/package.json +++ b/minauth-demo/minauth-demo-client/package.json @@ -5,7 +5,7 @@ "scripts": { "install-ci": "npm install --unsafe-perm=true", "dev": "next dev", - "dev-kill": "bash -c 'next dev & PID=$!; sleep 3; kill $PID; exit 0", + "dev-kill": "bash -c 'next dev & PID=$!; sleep 5; kill $PID; exit 0'", "build": "node --max-old-space-size=8192 ./node_modules/.bin/next build", "start": "next start", "test": "echo \"Error: no tests here\" && exit 0",