From 2112d1c970386af8f8f0ba3e0cd6b53904818324 Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Tue, 16 Nov 2021 06:37:58 -0600 Subject: [PATCH] Rework how the clean build command works. --- Makefile | 4 ++-- api/Makefile | 3 +++ web/Makefile | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9b5daa6..972a8fb 100755 --- a/Makefile +++ b/Makefile @@ -6,8 +6,8 @@ build: dist/hff-entry-forms-api.tar.gz dist/hff-entry-forms-web.tar.gz clean: -rm -r dist -rm -r web/dist - -docker container prune - -docker image prune + make -C api clean + make -C web clean update-version: operations/update-version.sh diff --git a/api/Makefile b/api/Makefile index 6820907..dc0e872 100644 --- a/api/Makefile +++ b/api/Makefile @@ -69,6 +69,9 @@ serve-docker: build-image # Utility # ------- +clean: + -docker image rm $(ECR_ACCOUNT_URL)/hff_entry_forms_api:$(VERSION) + # Authenticate docker to the AWS private elastic container repository. ecr-auth: aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin $(ECR_ACCOUNT_URL) diff --git a/web/Makefile b/web/Makefile index ca13b5a..c2f3324 100755 --- a/web/Makefile +++ b/web/Makefile @@ -3,3 +3,6 @@ build: serve: npm run serve + +clean: + -rm -r dist