ci-tools: versions of golang
Add and update golang versions. Also fix install.tools target for installing govet Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
ad9d643c3d
commit
d4ede0d364
|
@ -1,7 +1,8 @@
|
||||||
language: go
|
language: go
|
||||||
go:
|
go:
|
||||||
- 1.6
|
- 1.7
|
||||||
- 1.5.3
|
- 1.6.3
|
||||||
|
- 1.5.4
|
||||||
|
|
||||||
sudo: required
|
sudo: required
|
||||||
|
|
||||||
|
|
14
Makefile
14
Makefile
|
@ -68,9 +68,7 @@ ALLOWED_GO_VERSION = $(shell test '$(shell /bin/echo -e "$(1)\n$(2)" | sort -V |
|
||||||
|
|
||||||
test: .govet .golint .gitvalidation
|
test: .govet .golint .gitvalidation
|
||||||
|
|
||||||
# `go get golang.org/x/tools/cmd/vet`
|
|
||||||
.govet:
|
.govet:
|
||||||
@go tool | grep -qw vet || (echo "ERROR: 'go vet' not found. Consider 'make install.tools' target" && false)
|
|
||||||
go vet -x ./...
|
go vet -x ./...
|
||||||
|
|
||||||
# `go get github.com/golang/lint/golint`
|
# `go get github.com/golang/lint/golint`
|
||||||
|
@ -92,22 +90,16 @@ endif
|
||||||
|
|
||||||
|
|
||||||
.PHONY: install.tools
|
.PHONY: install.tools
|
||||||
install.tools: .install.golint .install.govet .install.gitvalidation
|
install.tools: .install.golint .install.gitvalidation
|
||||||
|
|
||||||
# golint does not even build for <go1.5
|
# golint does not even build for <go1.5
|
||||||
.install.golint:
|
.install.golint:
|
||||||
ifeq ($(call ALLOWED_GO_VERSION,1.5,$(HOST_GOLANG_VERSION)),true)
|
ifeq ($(call ALLOWED_GO_VERSION,1.5,$(HOST_GOLANG_VERSION)),true)
|
||||||
go get github.com/golang/lint/golint
|
go get -u github.com/golang/lint/golint
|
||||||
endif
|
|
||||||
|
|
||||||
# go vet is now included in >=go1.5, so no need to get it.
|
|
||||||
.install.govet:
|
|
||||||
ifeq ($(call ALLOWED_GO_VERSION,1.5,$(HOST_GOLANG_VERSION)),true)
|
|
||||||
go get golang.org/x/tools/cmd/vet
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.install.gitvalidation:
|
.install.gitvalidation:
|
||||||
go get github.com/vbatts/git-validation
|
go get -u github.com/vbatts/git-validation
|
||||||
|
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
Loading…
Reference in New Issue