From 51a09f9ca5f4c717134ec256aac16774d08ea671 Mon Sep 17 00:00:00 2001 From: Josh Slaughter <8338893+jdslaugh@users.noreply.github.com> Date: Thu, 17 Oct 2024 10:14:12 -0700 Subject: [PATCH] housekeeping: Fixing makefile from scaffolding update (#3148) --- .github/workflows/frontend.yml | 10 +++++----- tools/scaffolding/templates/gateway/Makefile | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 12f405123c..1f78634a3c 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -48,7 +48,7 @@ jobs: key: ${{ runner.os }}-fe-build-${{ hashFiles('**/yarn.lock') }} - name: Install dependencies if: steps.node-modules-cache.outputs.cache-hit != 'true' - run: make yarn-install + run: make frontend-install - name: build run: make frontend lint: @@ -72,7 +72,7 @@ jobs: key: ${{ runner.os }}-${{ steps.setup-node.outputs.node-version }}-node-modules-${{ hashFiles('**/yarn.lock') }} - name: Install dependencies if: steps.node-modules-cache.outputs.cache-hit != 'true' - run: make yarn-install + run: make frontend-install - name: Compile packages run: yarn run compile:dev working-directory: ${{ env.FRONTEND_DIR }} @@ -135,7 +135,7 @@ jobs: ${{ runner.os }}-go-build- - name: Install dependencies if: steps.node-modules-cache.outputs.cache-hit != 'true' - run: make yarn-install + run: make frontend-install - name: Compile packages run: yarn run compile:dev working-directory: ${{ env.FRONTEND_DIR }} @@ -169,7 +169,7 @@ jobs: key: ${{ runner.os }}-${{ steps.setup-node.outputs.node-version }}-node-modules-${{ hashFiles('**/yarn.lock') }} - name: Install dependencies if: steps.node-modules-cache.outputs.cache-hit != 'true' - run: make yarn-install + run: make frontend-install - name: Compile packages run: yarn run compile:dev working-directory: ${{ env.FRONTEND_DIR }} @@ -199,7 +199,7 @@ jobs: key: ${{ runner.os }}-${{ steps.setup-node.outputs.node-version }}-node-modules-${{ hashFiles('**/yarn.lock') }} - name: Install dependencies if: steps.node-modules-cache.outputs.cache-hit != 'true' - run: make yarn-install + run: make frontend-install - name: Set Publish Auth run: yarn config set npmAuthToken $NODE_AUTH_TOKEN working-directory: ${{ env.FRONTEND_DIR }} diff --git a/tools/scaffolding/templates/gateway/Makefile b/tools/scaffolding/templates/gateway/Makefile index fd20bd2360..95bc82f116 100644 --- a/tools/scaffolding/templates/gateway/Makefile +++ b/tools/scaffolding/templates/gateway/Makefile @@ -35,11 +35,11 @@ backend-with-assets: frontend cd backend && go run $(PRIMARY_MODULE_DIR)/cmd/assets/generate.go ../frontend/build && go build -tags withAssets -o ../build/clutch -ldflags="-X main.version=$(VERSION)" .PHONY: frontend -frontend: yarn-install +frontend: frontend-install $(YARN) --cwd frontend build -.PHONY: yarn-install -yarn-install: yarn-ensure +.PHONY: frontend-install +frontend-install : yarn-ensure ifneq ("$(wildcard frontend/yarn.lock)","") $(YARN) --cwd frontend install --immutable else @@ -51,5 +51,5 @@ yarn-ensure: @$(SHELL) $(TOOLS_MODULE_DIR)/install-yarn.sh .PHONY: frontend-dev # Start the frontend in development mode. -frontend-dev: yarn-ensure yarn-install +frontend-dev: yarn-ensure frontend-install $(YARN) --cwd frontend start