From cf9b600a70430dc6d7446daa34f4641bd58312cd Mon Sep 17 00:00:00 2001 From: Ping-Lin Chang Date: Tue, 6 Aug 2024 03:06:30 +0100 Subject: [PATCH] ci(Makefile): fix make all/latest --- Makefile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index fe30f95f..9c36fc19 100644 --- a/Makefile +++ b/Makefile @@ -77,14 +77,14 @@ endif .PHONY: build-latest build-latest: ## Build latest images for all Instill Core components - @docker build --progress plain \ - --build-arg ALPINE_VERSION=${ALPINE_VERSION} \ - --build-arg GOLANG_VERSION=${GOLANG_VERSION} \ - --build-arg K6_VERSION=${K6_VERSION} \ - --build-arg CACHE_DATE="$(shell date)" \ - --target latest \ - -t ${INSTILL_CORE_IMAGE_NAME}:latest . @if [ "${BUILD}" = "true" ]; then \ + docker build --progress plain \ + --build-arg ALPINE_VERSION=${ALPINE_VERSION} \ + --build-arg GOLANG_VERSION=${GOLANG_VERSION} \ + --build-arg K6_VERSION=${K6_VERSION} \ + --build-arg CACHE_DATE="$(shell date)" \ + --target latest \ + -t ${INSTILL_CORE_IMAGE_NAME}:latest .; \ docker run --rm \ -v /var/run/docker.sock:/var/run/docker.sock \ -v ./.env:/instill-core/.env \ @@ -103,7 +103,8 @@ build-latest: ## Build latest images for all Instill Core components .PHONY: build-release build-release: ## Build release images for all Instill Core components - @docker build --progress plain \ + @if [ "${BUILD}" = "true" ]; then \ + docker build --progress plain \ --build-arg ALPINE_VERSION=${ALPINE_VERSION} \ --build-arg GOLANG_VERSION=${GOLANG_VERSION} \ --build-arg K6_VERSION=${K6_VERSION} \ @@ -115,8 +116,7 @@ build-release: ## Build release images for all Instill Core components --build-arg ARTIFACT_BACKEND_VERSION=${ARTIFACT_BACKEND_VERSION} \ --build-arg CONSOLE_VERSION=${CONSOLE_VERSION} \ --target release \ - -t ${INSTILL_CORE_IMAGE_NAME}:${INSTILL_CORE_VERSION} . - @if [ "${BUILD}" = "true" ]; then \ + -t ${INSTILL_CORE_IMAGE_NAME}:${INSTILL_CORE_VERSION} .; \ docker run --rm \ -v /var/run/docker.sock:/var/run/docker.sock \ -v ./.env:/instill-core/.env \