From 60dd34d066c18e0e9b39874bcdce1502a57f4a65 Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Mon, 7 Dec 2020 11:48:58 +0000 Subject: [PATCH] make: Drop support for Go 1.9 in `make build` docs/development.md says the minimum required Golang version is 1.13 at the time of writing. Signed-off-by: Joe Groocock --- Makefile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 41682454..01029fe8 100644 --- a/Makefile +++ b/Makefile @@ -170,13 +170,7 @@ GOOS=$(firstword $(subst -, ,$*)) GOARCH=$(lastword $(subst -, ,$*)) build/mgmt-%: $(GO_FILES) $(MCL_FILES) | bindata lang funcgen @echo "Building: $(PROGRAM), os/arch: $*, version: $(SVERSION)..." - @# reassigning GOOS and GOARCH to make build command copy/pastable - @# go 1.10+ requires specifying the package for ldflags - @if go version | grep -qE 'go1.9'; then \ - time env GOOS=${GOOS} GOARCH=${GOARCH} go build -i -ldflags "-X main.program=$(PROGRAM) -X main.version=$(SVERSION) ${LDFLAGS}" -o $@ $(BUILD_FLAGS); \ - else \ - time env GOOS=${GOOS} GOARCH=${GOARCH} go build -i -ldflags=$(PKGNAME)="-X main.program=$(PROGRAM) -X main.version=$(SVERSION) ${LDFLAGS}" -o $@ $(BUILD_FLAGS); \ - fi + @time env GOOS=${GOOS} GOARCH=${GOARCH} go build -i -ldflags=$(PKGNAME)="-X main.program=$(PROGRAM) -X main.version=$(SVERSION) ${LDFLAGS}" -o $@ $(BUILD_FLAGS) # create a list of binary file names to use as make targets crossbuild_targets = $(addprefix build/mgmt-,$(subst /,-,${GOOSARCHES}))