From bf857faf208676b0294bd49959aa34c8d98163ed Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Mon, 4 Mar 2019 14:48:40 +0100 Subject: [PATCH] Add Go 1.12 to Travis CI (#174) Also update to the latest version of Makefile.common. Signed-off-by: Simon Pasquier --- .travis.yml | 7 ++++--- Makefile.common | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index c295cb0f..e863e26c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,14 @@ -sudo: false - language: go +# Supported Go versions are synced with github.com/prometheus/client_golang. go: - 1.7.x - 1.8.x - 1.9.x - 1.10.x - 1.11.x + - 1.12.x script: - make test - - if [[ $TRAVIS_GO_VERSION =~ ^1\.(11)\. ]]; then make style; fi + # style is only checked against the latest supported Go version. + - if [[ $TRAVIS_GO_VERSION =~ ^1\.(12)\. ]]; then make style; fi diff --git a/Makefile.common b/Makefile.common index a422e1b6..7105cff0 100644 --- a/Makefile.common +++ b/Makefile.common @@ -70,7 +70,7 @@ else GO_BUILD_PLATFORM ?= $(GOHOSTOS)-$(GOHOSTARCH) endif -PROMU_VERSION ?= 0.2.0 +PROMU_VERSION ?= 0.3.0 PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz STATICCHECK_VERSION ?= 2019.1 STATICCHECK_URL := https://github.com/dominikh/go-tools/releases/download/$(STATICCHECK_VERSION)/staticcheck_$(GOHOSTOS)_$(GOHOSTARCH) @@ -87,14 +87,14 @@ ifeq ($(GOHOSTARCH),amd64) endif endif -.PHONY: all -all: precheck style staticcheck unused build test - # This rule is used to forward a target like "build" to "common-build". This # allows a new "build" target to be defined in a Makefile which includes this # one and override "common-build" without override warnings. %: common-% ; +.PHONY: common-all +common-all: precheck style check_license staticcheck unused build test + .PHONY: common-style common-style: @echo ">> checking code style"