Skip to content

Commit

Permalink
chore: simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
zucchinidev committed Nov 14, 2023
1 parent af87d20 commit bdd6ec3
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bdd6ec3

Please sign in to comment.