Skip to content

Commit

Permalink
make,travis: drop golang 1.7.x, add 1.9.x, 1.10.x
Browse files Browse the repository at this point in the history
  • Loading branch information
James DeFelice authored and jdef committed Apr 13, 2018
1 parent 010bea7 commit b4dce5f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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; }
Expand Down

0 comments on commit b4dce5f

Please sign in to comment.