diff --git a/govtool/status-service/Makefile b/govtool/status-service/status-service.mk similarity index 94% rename from govtool/status-service/Makefile rename to govtool/status-service/status-service.mk index 07d975981..1337f776a 100644 --- a/govtool/status-service/Makefile +++ b/govtool/status-service/status-service.mk @@ -1,4 +1,4 @@ -common_mk := ../../scripts/govtool/common.mk +common_mk := common.mk ifeq ($(origin $(common_mk)), undefined) $(eval $(common_mk) := included) include $(common_mk) diff --git a/scripts/govtool/Makefile b/scripts/govtool/Makefile index 281de5f36..3fab57890 100644 --- a/scripts/govtool/Makefile +++ b/scripts/govtool/Makefile @@ -1,7 +1,7 @@ -include ../../govtool/backend/Makefile -include ../../govtool/frontend/Makefile -include ../../govtool/status-service/Makefile -include ../../govtool/metadata-validation/Makefile +include backend.mk +include frontend.mk +include status-service.mk +include metadata-validation.mk include utils.mk include info.mk include config.mk diff --git a/govtool/backend/Makefile b/scripts/govtool/backend.mk similarity index 96% rename from govtool/backend/Makefile rename to scripts/govtool/backend.mk index 1919d4847..a523973dd 100644 --- a/govtool/backend/Makefile +++ b/scripts/govtool/backend.mk @@ -1,4 +1,4 @@ -common_mk := ../../scripts/govtool/common.mk +common_mk := common.mk ifeq ($(origin $(common_mk)), undefined) $(eval $(common_mk) := included) include $(common_mk) diff --git a/scripts/govtool/config.mk b/scripts/govtool/config.mk index 87c424d03..2a7c4b770 100644 --- a/scripts/govtool/config.mk +++ b/scripts/govtool/config.mk @@ -1,4 +1,4 @@ -common_mk := ../../scripts/govtool/common.mk +common_mk := common.mk ifeq ($(origin $(common_mk)), undefined) $(eval $(common_mk) := included) include $(common_mk) diff --git a/govtool/frontend/Makefile b/scripts/govtool/frontend.mk similarity index 95% rename from govtool/frontend/Makefile rename to scripts/govtool/frontend.mk index a9c19da18..97caf9bef 100644 --- a/govtool/frontend/Makefile +++ b/scripts/govtool/frontend.mk @@ -1,4 +1,4 @@ -common_mk := ../../scripts/govtool/common.mk +common_mk := common.mk ifeq ($(origin $(common_mk)), undefined) $(eval $(common_mk) := included) include $(common_mk) diff --git a/govtool/metadata-validation/Makefile b/scripts/govtool/metadata-validation.mk similarity index 94% rename from govtool/metadata-validation/Makefile rename to scripts/govtool/metadata-validation.mk index 10b0379db..d9ab1a150 100644 --- a/govtool/metadata-validation/Makefile +++ b/scripts/govtool/metadata-validation.mk @@ -1,4 +1,4 @@ -common_mk := ../../scripts/govtool/common.mk +common_mk := common.mk ifeq ($(origin $(common_mk)), undefined) $(eval $(common_mk) := included) include $(common_mk) diff --git a/scripts/govtool/status-service.mk b/scripts/govtool/status-service.mk new file mode 100644 index 000000000..1337f776a --- /dev/null +++ b/scripts/govtool/status-service.mk @@ -0,0 +1,21 @@ +common_mk := common.mk +ifeq ($(origin $(common_mk)), undefined) + $(eval $(common_mk) := included) + include $(common_mk) +endif + +.DEFAULT_GOAL := push-status-service + +# image tags +status_service_image_tag := $(shell git log -n 1 --format="%H" -- $(root_dir)/govtool/status-service) + +.PHONY: build-status-service +build-status-service: docker-login + $(call check_image_on_ecr,status-service,$(status_service_image_tag)) || \ + $(docker) build --tag "$(repo_url)/status-service:$(status_service_image_tag)" \ + $(root_dir)/govtool/status-service + +.PHONY: push-status-service +push-status-service: build-status-service + $(call check_image_on_ecr,status-service,$(status_service_image_tag)) || \ + $(docker) push $(repo_url)/status-service:$(status_service_image_tag)