From bdd6ec3bab67b6d36a10c9b2f2ea4e6dc9406350 Mon Sep 17 00:00:00 2001 From: Andrea Zucchini Date: Tue, 14 Nov 2023 12:32:43 +0000 Subject: [PATCH] chore: simplify code [#186180915](https://www.pivotaltracker.com/story/show/186180915) --- Makefile | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/Makefile b/Makefile index 4232d6ef..295f7f8e 100644 --- a/Makefile +++ b/Makefile @@ -5,26 +5,9 @@ GO-VERSION = 1.21.4 GO-VER = go$(GO-VERSION) -GO_OK := $(or $(USE_GO_CONTAINERS), $(shell which go 1>/dev/null 2>/dev/null; echo $$?)) -DOCKER_OK := $(shell which docker 1>/dev/null 2>/dev/null; echo $$?) - -ifeq ($(GO_OK), 0) # use local go binary - -PAK_PATH=$(PWD) GO=go GOFMT=gofmt -else ifeq ($(DOCKER_OK), 0) - -PAK_PATH=/brokerapi -GO_DOCKER_OPTS=--rm -v $(PWD):$(PAK_PATH) -w $(PAK_PATH) --network=host -GO=docker run $(GO_DOCKER_OPTS) golang:latest go -GOFMT=docker run $(GO_DOCKER_OPTS) golang:latest gofmt - -else -$(error either Go or Docker must be installed) -endif - .PHONY: help help: ## list Makefile targets