From c3ea11eeedf83cf5dd4abf409390f6a3950c90b7 Mon Sep 17 00:00:00 2001 From: Tom Wieczorek Date: Mon, 16 Dec 2024 13:14:08 +0100 Subject: [PATCH] Use empty string to disable Docker integration The previous sentinel value of "false" may have given the impression that "true" is the correct value to enable Docker build integration. Also, "false" is actually an executable provided by coreutils. An empty string can never point to a potentially executable file, and won't give the impression that DOCKER is some sort of boolean variable. Signed-off-by: Tom Wieczorek --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 08f4a33dee18..d5f5f90accbc 100644 --- a/Makefile +++ b/Makefile @@ -21,12 +21,13 @@ K0S_GO_BUILD_CACHE ?= build/cache GO_SRCS := $(shell find . -type f -name '*.go' -not -path './$(K0S_GO_BUILD_CACHE)/*' -not -path './inttest/*' -not -name '*_test.go' -not -name 'zz_generated*') GO_CHECK_UNIT_DIRS := . ./cmd/... ./pkg/... ./internal/... ./static/... ./hack/... -DOCKER = docker +DOCKER ?= docker # EMBEDDED_BINS_BUILDMODE can be either: # docker builds the binaries in docker # none does not embed any binaries -ifeq ($(DOCKER),false) +# Disable Docker build integration if DOCKER is set to the empty string. +ifeq ($(DOCKER),) EMBEDDED_BINS_BUILDMODE ?= none K0S_BUILD_IMAGE_FILE = GO ?= go @@ -35,6 +36,7 @@ else K0S_BUILD_IMAGE_FILE = .k0sbuild.docker-image.k0s GO ?= $(GO_ENV) go endif + # k0s runs on linux even if it's built on mac or windows TARGET_OS ?= linux BUILD_UID ?= $(shell id -u)