Skip to content

Commit 7a36e7e

Browse files
authored
Merge pull request opencontainers#547 from vbatts/go_vet
ci-tools: versions of golang
2 parents 22c29c1 + d4ede0d commit 7a36e7e

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
language: go
22
go:
3-
- 1.6
4-
- 1.5.3
3+
- 1.7
4+
- 1.6.3
5+
- 1.5.4
56

67
sudo: required
78

Makefile

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
EPOCH_TEST_COMMIT := 78e6667ae2d67aad100b28ee9580b41b7a24e667
33
OUTPUT_DIRNAME ?= output/
44
DOC_FILENAME ?= oci-runtime-spec
5-
SHELL ?= $(shell command -v bash 2>/dev/null)
65
DOCKER ?= $(shell command -v docker 2>/dev/null)
76
PANDOC ?= $(shell command -v pandoc 2>/dev/null)
87
ifeq "$(strip $(PANDOC))" ''
@@ -63,15 +62,13 @@ version.md: ./specs-go/version.go
6362

6463
HOST_GOLANG_VERSION = $(shell go version | cut -d ' ' -f3 | cut -c 3-)
6564
# this variable is used like a function. First arg is the minimum version, Second arg is the version to be checked.
66-
ALLOWED_GO_VERSION = $(shell test '$(shell /bin/echo -e "$(1)\n$(2)" | sort -V | head -n1)' == '$(1)' && echo 'true')
65+
ALLOWED_GO_VERSION = $(shell test '$(shell /bin/echo -e "$(1)\n$(2)" | sort -V | head -n1)' = '$(1)' && echo 'true')
6766

6867
.PHONY: test .govet .golint .gitvalidation
6968

7069
test: .govet .golint .gitvalidation
7170

72-
# `go get golang.org/x/tools/cmd/vet`
7371
.govet:
74-
@go tool | grep -qw vet || (echo "ERROR: 'go vet' not found. Consider 'make install.tools' target" && false)
7572
go vet -x ./...
7673

7774
# `go get github.com/golang/lint/golint`
@@ -93,22 +90,16 @@ endif
9390

9491

9592
.PHONY: install.tools
96-
install.tools: .install.golint .install.govet .install.gitvalidation
93+
install.tools: .install.golint .install.gitvalidation
9794

9895
# golint does not even build for <go1.5
9996
.install.golint:
10097
ifeq ($(call ALLOWED_GO_VERSION,1.5,$(HOST_GOLANG_VERSION)),true)
101-
go get github.com/golang/lint/golint
102-
endif
103-
104-
# go vet is now included in >=go1.5, so no need to get it.
105-
.install.govet:
106-
ifeq ($(call ALLOWED_GO_VERSION,1.5,$(HOST_GOLANG_VERSION)),true)
107-
go get golang.org/x/tools/cmd/vet
98+
go get -u github.com/golang/lint/golint
10899
endif
109100

110101
.install.gitvalidation:
111-
go get github.com/vbatts/git-validation
102+
go get -u github.com/vbatts/git-validation
112103

113104

114105
.PHONY: clean

0 commit comments

Comments
 (0)