From e6d39d149e0023475f534bcc8a648c987e73cfc2 Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Thu, 17 Mar 2022 09:26:15 +0100 Subject: [PATCH 1/2] CI: Also test with Golang 1.18 --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b2e8a93..5575404 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,6 +18,7 @@ jobs: - "1.15" - "1.16" - "1.17" + - "1.18" runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 2ebd93d71dca44c1fe22c86a5cafdddbd99ce550 Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Wed, 23 Mar 2022 11:11:36 +0100 Subject: [PATCH 2/2] make: Install easyjson for Golang 1.17+ --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 1d5adeb..ca4100d 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ GOPATH := "$(CURDIR)/vendor:$(CURDIR)" GOFMT := "$(shell dirname "$(GO)")/gofmt" GOOS ?= linux GOARCH ?= amd64 +GOVERSION := $(shell "$(GO)" env GOVERSION | sed "s|go||" ) BINDIR := "$(CURDIR)/bin" VERSION := $(shell "$(CURDIR)/scripts/get-version.sh") TARVERSION := $(shell "$(CURDIR)/scripts/get-version.sh" --tar) @@ -49,6 +50,9 @@ hook: ./vendor/bin/easyjson: GOPATH=$(GOPATH) $(GO) get -u github.com/mailru/easyjson/... + @if dpkg --compare-versions "$(GOVERSION)" "ge" "1.17" ; then \ + GOPATH=$(GOPATH) $(GO) install github.com/mailru/easyjson/...; \ + fi continentmap.go: $(CURDIR)/scripts/get_continent_map.py $@