From c1c3d3b3aa01eaf4741f4344103c20c936a54863 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Fri, 5 Mar 2021 14:13:46 -0800 Subject: [PATCH] remove unused targets More can be removed/refactored but avoiding a huge change. Signed-off-by: Tonis Tiigi (cherry picked from commit 706e857a90974e4ac9349a3c588419fe62d29df3) Signed-off-by: Tibor Vass --- Makefile | 19 +++++-------------- docker.Makefile | 20 -------------------- 2 files changed, 5 insertions(+), 34 deletions(-) diff --git a/Makefile b/Makefile index 96c6379c93..9e62210c33 100644 --- a/Makefile +++ b/Makefile @@ -30,37 +30,28 @@ lint: ## run all the lint tools gometalinter --config gometalinter.json ./... .PHONY: binary -binary: ## build executable for Linux - @echo "WARNING: binary creates a Linux executable. Use cross for macOS or Windows." - ./scripts/build/binary +binary: + docker buildx bake binary .PHONY: plugins plugins: ## build example CLI plugins ./scripts/build/plugins .PHONY: cross -cross: ## build executable for macOS and Windows - ./scripts/build/cross - -.PHONY: binary-windows -binary-windows: ## build executable for Windows - ./scripts/build/windows +cross: + docker buildx bake cross .PHONY: plugins-windows plugins-windows: ## build example CLI plugins for Windows ./scripts/build/plugins-windows -.PHONY: binary-osx -binary-osx: ## build executable for macOS - ./scripts/build/osx - .PHONY: plugins-osx plugins-osx: ## build example CLI plugins for macOS ./scripts/build/plugins-osx .PHONY: dynbinary dynbinary: ## build dynamically linked binary - ./scripts/build/dynbinary + USE_GLIBC=1 docker buildx bake dynbinary vendor: vendor.conf ## check that vendor matches vendor.conf rm -rf vendor diff --git a/docker.Makefile b/docker.Makefile index 804133b2fb..4f582b7fb7 100644 --- a/docker.Makefile +++ b/docker.Makefile @@ -38,11 +38,6 @@ build_linter_image: # build dockerfile from stdin so that we don't send the build-context; source is bind-mounted in the development environment cat ./dockerfiles/Dockerfile.lint | docker build ${DOCKER_BUILD_ARGS} --build-arg=GO_VERSION -t $(LINTER_IMAGE_NAME) - -.PHONY: build_cross_image -build_cross_image: - # build dockerfile from stdin so that we don't send the build-context; source is bind-mounted in the development environment - cat ./dockerfiles/Dockerfile.cross | docker build ${DOCKER_BUILD_ARGS} --build-arg=GO_VERSION -t $(CROSS_IMAGE_NAME) - - .PHONY: build_shell_validate_image build_shell_validate_image: # build dockerfile from stdin so that we don't send the build-context; source is bind-mounted in the development environment @@ -80,22 +75,10 @@ test-unit: build_docker_image ## run unit tests (using go test) .PHONY: test ## run unit and e2e tests test: test-unit test-e2e -.PHONY: cross -cross: build_cross_image ## build the CLI for macOS and Windows - $(DOCKER_RUN) $(CROSS_IMAGE_NAME) make cross - -.PHONY: binary-windows -binary-windows: build_cross_image ## build the CLI for Windows - $(DOCKER_RUN) $(CROSS_IMAGE_NAME) make $@ - .PHONY: plugins-windows plugins-windows: build_cross_image ## build the example CLI plugins for Windows $(DOCKER_RUN) $(CROSS_IMAGE_NAME) make $@ -.PHONY: binary-osx -binary-osx: build_cross_image ## build the CLI for macOS - $(DOCKER_RUN) $(CROSS_IMAGE_NAME) make $@ - .PHONY: plugins-osx plugins-osx: build_cross_image ## build the example CLI plugins for macOS $(DOCKER_RUN) $(CROSS_IMAGE_NAME) make $@ @@ -120,9 +103,6 @@ fmt: ## run gofmt vendor: build_docker_image vendor.conf ## download dependencies (vendor/) listed in vendor.conf $(DOCKER_RUN) -it $(DEV_DOCKER_IMAGE_NAME) make vendor -dynbinary: build_cross_image ## build the CLI dynamically linked - $(DOCKER_RUN) -it $(CROSS_IMAGE_NAME) make dynbinary - .PHONY: authors authors: ## generate AUTHORS file from git history $(DOCKER_RUN) -it $(DEV_DOCKER_IMAGE_NAME) make authors