diff --git a/scripts/govtool/common.mk b/scripts/govtool/common.mk index 00ae579fe..b8c210c7c 100644 --- a/scripts/govtool/common.mk +++ b/scripts/govtool/common.mk @@ -35,14 +35,13 @@ __check_defined = \ $(if $(value $1),, \ $(error Undefined $1$(if $2, ($2)))) -# helper function for checking if we should force rebuild the images -check_force_rebuild = \ - [[ -z "$$FORCE_REBUILD" ]] || \ - { echo "Forcing rebuild of images"; } - # helper function for checking if image exists on ECR check_image_on_ecr = \ - $(docker) manifest inspect "$(repo_url)/$1:$2" > /dev/null 2>&1 + if [ -z "$$FORCE_REBUILD" ]; then \ + exit 1 \ + else \ + $(docker) manifest inspect "$(repo_url)/$1:$2" > /dev/null 2>&1 \ + fi .PHONY: check-env-defined check-env-defined: diff --git a/scripts/govtool/frontend.mk b/scripts/govtool/frontend.mk index 7f8aa3fa6..2db555723 100644 --- a/scripts/govtool/frontend.mk +++ b/scripts/govtool/frontend.mk @@ -13,7 +13,7 @@ frontend_image_tag := $(shell git log -n 1 --format="%H" -- $(root_dir)/govtool/ build-frontend: docker-login @:$(call check_defined, cardano_network) if [[ "$(cardano_network)" = "mainnet" ]]; then NETWORK_FLAG=1; else NETWORK_FLAG=0; fi; \ - $(call check_force_rebuild,check_image_on_ecr,frontend,$(frontend_image_tag)) || \ + $(call check_image_on_ecr,frontend,$(frontend_image_tag)) || \ $(docker) build --tag "$(repo_url)/frontend:$(frontend_image_tag)" \ --build-arg VITE_APP_ENV="$(env)" \ --build-arg VITE_BASE_URL="https://$(domain)/api" \