From dcec289400a1d789100a2f0bb38da8594dcd90a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Thu, 5 Mar 2020 14:41:38 +0100 Subject: [PATCH] Remove support for Go < 1.11 --- .github/workflows/ci.yml | 2 +- Makefile | 19 +++++++++---------- README.md | 2 +- script/test | 1 - 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77278e91..07d17c01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: strategy: fail-fast: false matrix: - go: [ '1.9', '1.10', '1.11', '1.12', '1.13' ] + go: [ '1.11', '1.12', '1.13', '1.14' ] steps: - uses: actions/checkout@v1 diff --git a/Makefile b/Makefile index 5f6d7574..e91beca5 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,16 @@ -SOURCES = $(shell script/build files) +SOURCES = $(shell go list -f '{{range .GoFiles}}{{$$.Dir}}/{{.}}\ +{{end}}' ./...) SOURCE_DATE_EPOCH ?= $(shell date +%s) BUILD_DATE = $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" '+%d %b %Y' 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" '+%d %b %Y') HUB_VERSION = $(shell bin/hub version | tail -1) -FLAGS_ALL = $(shell go version | grep -q 'go1.[89]' || echo 'all=') -export GOFLAGS := $(shell go version | grep -q 'go1.1[^0]' && echo '-mod=vendor') -export LDFLAGS := -extldflags '$(LDFLAGS)' -export GCFLAGS := $(FLAGS_ALL)-trimpath '$(PWD)' -export ASMFLAGS := $(FLAGS_ALL)-trimpath '$(PWD)' -ifneq ($(GOFLAGS),) - export GO111MODULE=on - unexport GOPATH -endif +export GOFLAGS := -mod=vendor +export GO111MODULE=on +unexport GOPATH + +export LDFLAGS := -extldflags '$(LDFLAGS)' +export GCFLAGS := all=-trimpath '$(PWD)' +export ASMFLAGS := all=-trimpath '$(PWD)' MIN_COVERAGE = 90.2 diff --git a/README.md b/README.md index b7e1ac79..af155133 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ it to your [repository secrets][]. Prerequisites for building from source are: * `make` -* [Go 1.9+](https://golang.org/doc/install) +* [Go 1.11+](https://golang.org/doc/install) Clone this repository and run `make install`: diff --git a/script/test b/script/test index 0417a8e1..a16facb8 100755 --- a/script/test +++ b/script/test @@ -32,7 +32,6 @@ STATUS=0 trap "exit 1" INT check_formatting() { - [[ "$(go version)" != *" go1.8."* ]] || return 0 gofmt -l -w . >/dev/null git checkout -- vendor if ! git diff -U1 --exit-code; then -- GitLab