Skip to content

Commit

Permalink
chore: change condition
Browse files Browse the repository at this point in the history
  • Loading branch information
MSzalowski committed Jun 19, 2024
1 parent 64a6ef9 commit 47bdd63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions scripts/govtool/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion scripts/govtool/frontend.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down

0 comments on commit 47bdd63

Please sign in to comment.