From b4dce5fcf39afb95926c9eec8ce6cbf0149e6155 Mon Sep 17 00:00:00 2001 From: James DeFelice Date: Fri, 13 Apr 2018 19:06:02 +0000 Subject: [PATCH] make,travis: drop golang 1.7.x, add 1.9.x, 1.10.x --- .travis.yml | 7 ++++--- Makefile | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index aa05d2d3..62a3f8a4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,10 @@ git: env: - PROTOBUF_VERSION=3.3.0 go: - # update validate-protobufs Makefile target once golang 1.8.x is no longer tested here - - 1.7.x + # update validate-protobufs Makefile target once golang 1.10.x is no longer tested here - 1.8.x + - 1.9.x + - 1.10.x before_install: #these two lines help users who fork mesos-go. It's a noop when running from the mesos organization - RepoName=`basename $PWD`; SrcDir=`dirname $PWD`; DestDir="`dirname $SrcDir`/mesos" @@ -18,7 +19,7 @@ before_install: - make sync - api/v1/vendor/github.com/gogo/protobuf/install-protobuf.sh # re-generate protobuf and json code, check that there are no differences w/ respect to what's been checked in - # ONLY for golang1.8.x; generated protobufs are not guaranteed to be consistent across golang versions + # ONLY for golang1.10.x; generated protobufs are not guaranteed to be consistent across golang versions - make validate-protobufs install: - make test install diff --git a/Makefile b/Makefile index d5a919a8..8b3497cb 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ BINARIES ?= $(shell go list -f "{{.Name}} {{.ImportPath}}" ${CMD_PKG}/...|grep - TEST_FLAGS ?= -race COVERAGE_TARGETS = ${TEST_DIRS:%/=%.cover} -GO_VERSION := $(shell go version|cut -f3 -d' '|dd bs=1 count=5 2>/dev/null) +GO_VERSION := $(shell go version|cut -f3 -d' '|dd bs=1 count=6 2>/dev/null) .PHONY: all all: test @@ -121,7 +121,7 @@ docker: mkdir -p _output test -n "$(UID)" || (echo 'ERROR: $$UID is undefined'; exit 1) test -n "$(GID)" || (echo 'ERROR: $$GID is undefined'; exit 1) - docker run --rm -v "$$PWD":/src -w /go/src/$(GOPKG_DIRNAME) golang:1.8.1-alpine sh -c $(BUILD_STEP)' && '$(COPY_STEP) + docker run --rm -v "$$PWD":/src -w /go/src/$(GOPKG_DIRNAME) golang:1.10.1-alpine sh -c $(BUILD_STEP)' && '$(COPY_STEP) make -C api/${MESOS_API_VERSION}/docker .PHONY: coveralls @@ -134,7 +134,7 @@ coveralls: # re-generate protobuf and json code, check that there are no differences w/ respect to what's been checked in .PHONY: validate-protobufs -ifeq ($(GO_VERSION),go1.8) +ifeq ($(GO_VERSION),go1.10) validate-protobufs: SHELL := /bin/bash validate-protobufs: (cd api/v1; govendor install +vendor,program) && $(MAKE) -s protobufs ffjson && [[ `{ git status --porcelain || echo "failed"; } | tee /tmp/status | wc -l` = "0" ]] || { cat /tmp/status; git diff; false; }