Merge pull request #17 from syscll/feature/go-1.11

build: use go 1.11
This commit is contained in:
Joel Speed 2019-01-16 12:28:20 +00:00 committed by GitHub
commit 473112216f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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