From: Jérôme Benoit Date: Tue, 20 Oct 2020 20:07:00 +0000 (+0200) Subject: Allow docker image build without submodules access. X-Git-Tag: v1.0.1-0~260 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=1355b83a8bb6fd21570e2937d1636efb7b5c3fd4;p=e-mobility-charging-stations-simulator.git Allow docker image build without submodules access. Signed-off-by: Jérôme Benoit --- diff --git a/docker/Makefile b/docker/Makefile index d3eefbc0..c82d604a 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -1,5 +1,6 @@ PROJECT_NAME?=evse NAME:=simulator +SUBMODULES_INIT?=true DOCKER_ECR_ACCOUNT_ID?=166296450311 DOCKER_ECR_REGION?=eu-west-3 DOCKER_ECR_REGISTRY_NAME?=ev_simulator @@ -12,10 +13,15 @@ default: all submodule-update: git submodule update --init --recursive -$(NAME): submodule-update +submodules-init= +ifeq '$(SUBMODULES_INIT)' 'true' + submodules-init += submodule-update +endif + +$(NAME): $(submodules-init) docker-compose -p $(PROJECT_NAME) up -d -$(NAME)-force: submodule-update +$(NAME)-force: $(submodules-init) docker-compose -p $(PROJECT_NAME) up -d --build --force-recreate all: $(NAME)