From c905c58c99042e7a8e9f84894974095734bb48cf Mon Sep 17 00:00:00 2001 From: Noah Negin-Ulster Date: Wed, 23 Mar 2022 15:45:30 -0400 Subject: [PATCH] refactor: run yarn install before make commands --- Makefile | 8 ++++---- service/Makefile | 18 +++++++++++++----- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index e9027a66..08a86152 100644 --- a/Makefile +++ b/Makefile @@ -10,14 +10,14 @@ install: yarn install .PHONY: deploy-release-dry -deploy-release-dry: +deploy-release-dry: install yarn monodeploy \ --config-file monodeploy.config.js \ --log-level 0 \ --dry-run .PHONY: deploy-release -deploy-release: +deploy-release: install yarn monodeploy \ --config-file monodeploy.config.js \ --log-level 0 \ @@ -40,9 +40,9 @@ endif ESLINT_ARGS=--max-warnings 0 $(ESLINT_EXTRA_ARGS) .PHONY: lint -lint: +lint: install yarn eslint $(ESLINT_ARGS) . .PHONY: lint-fix -lint-fix: +lint-fix: install yarn eslint $(ESLINT_ARGS) --fix . diff --git a/service/Makefile b/service/Makefile index 8f46d4b1..dc267039 100644 --- a/service/Makefile +++ b/service/Makefile @@ -20,14 +20,22 @@ ifeq ($(shell uname -m),aarch64) ARCH ?= arm endif -.PHONY: install -install: clean - PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true yarn install +.PHONY: terraform-dependencies +terraform-dependencies: echo $(TERRAFORM_VERSION) curl -L -o terraform.zip "https://releases.hashicorp.com/terraform/$(TERRAFORM_VERSION)/terraform_$(TERRAFORM_VERSION)_$(OS)_${ARCH}.zip" unzip terraform.zip -d .cache rm terraform.zip +.PHONY: dependencies +dependencies: + PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true yarn install + +.PHONY: install +install: clean + make terraform-dependencies + make dependencies + # ----- Helpers ----- .PHONY: clean @@ -37,11 +45,11 @@ clean: -@rm -rf .cache .PHONY: typecheck -typecheck: +typecheck: dependencies yarn workspace sanity-runner-service tsc -p tsconfig.json --noEmit .PHONY: bundle -bundle: typecheck +bundle: dependencies typecheck -@rm -rf dist @mkdir -p dist yarn workspace sanity-runner-service \