From dd53826e47cf51fafa1dc1e5820a14ea3caa3b01 Mon Sep 17 00:00:00 2001 From: Carlos Panato Date: Thu, 11 Mar 2021 15:30:10 +0100 Subject: [PATCH] kubecross: remove Makefile.build-image dependencie and check if the env vars are set --- images/build/cross/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/images/build/cross/Makefile b/images/build/cross/Makefile index e088c04d33c..d4c17222acd 100644 --- a/images/build/cross/Makefile +++ b/images/build/cross/Makefile @@ -12,9 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# include the common image-building Makefiles -include $(CURDIR)/../Makefile.build-image - # set default shell SHELL=/bin/bash -o pipefail @@ -46,10 +43,15 @@ endif ARCHS = $(patsubst linux/%,%,$(PLATFORMS)) +check-env: +ifndef REGISTRY + $(error REGISTRY is undefined, please set to registry you want to push) +endif + # build with buildx # https://github.com/docker/buildx/issues/59 .PHONY: container -container: init-docker-buildx +container: check-env init-docker-buildx echo "Building $(IMGNAME) for the following platforms: $(PLATFORMS)" @for platform in $(PLATFORMS); do \ echo "Starting build for $${platform} platform"; \