build: use go 1.11

This commit is contained in:
Dan Bond 2019-01-15 15:57:53 +00:00
parent 78872725eb
commit f35efd1e9c
3 changed files with 8 additions and 6 deletions

View File

@ -1,10 +1,10 @@
language: go
go:
- 1.9.x
- 1.10.x
- 1.11.x
install:
# Fetch dependencies
- wget -O dep https://github.com/golang/dep/releases/download/v0.3.2/dep-linux-amd64
- wget -O dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
- chmod +x dep
- mv dep $GOPATH/bin/dep
script:

View File

@ -1,9 +1,11 @@
FROM golang:1.10 AS builder
FROM golang:1.11-stretch AS builder
WORKDIR /go/src/github.com/pusher/oauth2_proxy
COPY . .
# Fetch dependencies
RUN go get -u github.com/golang/dep/cmd/dep
RUN wget -O dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
RUN chmod +x dep
RUN mv dep $GOPATH/bin/dep
RUN dep ensure --vendor-only
# Build image

4
configure vendored
View File

@ -81,7 +81,7 @@ check_for() {
check_go_version() {
echo -n "Checking go version... "
GO_VERSION=$(${tools[go]} version | ${tools[awk]} '{where = match($0, /[0-9]\.[0-9]+\.[0-9]*/); if (where != 0) print substr($0, RSTART, RLENGTH)}')
vercomp $GO_VERSION 1.9
vercomp $GO_VERSION 1.10
case $? in
0) ;&
1)
@ -91,7 +91,7 @@ check_go_version() {
;;
2)
printf "${RED}"
echo "$GO_VERSION < 1.9"
echo "$GO_VERSION < 1.10"
exit 1
;;
esac