From 322b6f2d4d28e8fda8a2b982f8e7547222d0a0c0 Mon Sep 17 00:00:00 2001 From: Ian Lewis Date: Wed, 4 Oct 2023 14:05:34 +0900 Subject: [PATCH] chore: Update clean make target (#838) Signed-off-by: Ian Lewis --- Makefile | 7 ++++++- actions/issue-reopener/Makefile | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f8d1233a..b09fdfa0 100644 --- a/Makefile +++ b/Makefile @@ -172,4 +172,9 @@ yamllint: ## Runs the yamllint linter. .PHONY: clean clean: ## Delete temporary files. - rm -rf vendor node_modules + rm -rf vendor node_modules coverage.out + @set -e;\ + PATHS=$$(find actions/ -not -path '*/node_modules/*' -name package.json -type f | xargs dirname); \ + for path in $$PATHS; do \ + make -C $$path clean; \ + done diff --git a/actions/issue-reopener/Makefile b/actions/issue-reopener/Makefile index be804c4b..363da292 100644 --- a/actions/issue-reopener/Makefile +++ b/actions/issue-reopener/Makefile @@ -40,15 +40,17 @@ node_modules/.installed: package.json package-lock.json .PHONY: action action: node_modules/.installed ## Builds the action. + rm -rf lib npm run build .PHONY: package package: action ## Builds the distribution package. + rm -rf dist npm run package .PHONY: clean clean: - rm -rf dist lib node_modules + rm -rf lib node_modules coverage ## Tools #####################################################################