From b0371ac94962c455f33cda3be392471d14756938 Mon Sep 17 00:00:00 2001 From: Pulkit Jain Date: Thu, 20 Jun 2024 12:56:42 +0530 Subject: [PATCH] Fix overriding of DOCKER_IMG_VERSION in Makefile Signed-off-by: Pulkit Jain --- Makefile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index e455cad33dc..5978ae79a7e 100644 --- a/Makefile +++ b/Makefile @@ -27,14 +27,6 @@ GOLANGCI_LINT_VERSION := v1.54.0 GOLANGCI_LINT_BINDIR := $(CURDIR)/.golangci-bin GOLANGCI_LINT_BIN := $(GOLANGCI_LINT_BINDIR)/$(GOLANGCI_LINT_VERSION)/golangci-lint -BUILD_TAG := -ifndef CUSTOM_BUILD_TAG - BUILD_TAG = $(shell build/images/build-tag.sh) -else - BUILD_TAG = $(CUSTOM_BUILD_TAG) - DOCKER_IMG_VERSION = $(CUSTOM_BUILD_TAG) -endif - DOCKER_BUILD_ARGS := ifeq ($(NO_PULL),) DOCKER_BUILD_ARGS += --pull @@ -44,7 +36,6 @@ ifneq ($(NO_CACHE),) endif DOCKER_BUILD_ARGS += --build-arg OVS_VERSION=$(OVS_VERSION) DOCKER_BUILD_ARGS += --build-arg GO_VERSION=$(GO_VERSION) -DOCKER_BUILD_ARGS += --build-arg BUILD_TAG=$(BUILD_TAG) export CGO_ENABLED @@ -53,6 +44,15 @@ all: build include versioning.mk +BUILD_TAG := +ifndef CUSTOM_BUILD_TAG + BUILD_TAG = $(shell build/images/build-tag.sh) +else + BUILD_TAG = $(CUSTOM_BUILD_TAG) + DOCKER_IMG_VERSION = $(CUSTOM_BUILD_TAG) +endif +DOCKER_BUILD_ARGS += --build-arg BUILD_TAG=$(BUILD_TAG) + LDFLAGS += $(VERSION_LDFLAGS) UNAME_S := $(shell uname -s)