build: use go 1.11
This commit is contained in:
		
							parent
							
								
									78872725eb
								
							
						
					
					
						commit
						f35efd1e9c
					
				|  | @ -1,10 +1,10 @@ | ||||||
| language: go | language: go | ||||||
| go: | go: | ||||||
|   - 1.9.x |  | ||||||
|   - 1.10.x |   - 1.10.x | ||||||
|  |   - 1.11.x | ||||||
| install: | install: | ||||||
|   # Fetch dependencies |   # 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 |   - chmod +x dep | ||||||
|   - mv dep $GOPATH/bin/dep |   - mv dep $GOPATH/bin/dep | ||||||
| script: | script: | ||||||
|  |  | ||||||
|  | @ -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 | WORKDIR /go/src/github.com/pusher/oauth2_proxy | ||||||
| COPY . . | COPY . . | ||||||
| 
 | 
 | ||||||
| # Fetch dependencies | # 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 | RUN dep ensure --vendor-only | ||||||
| 
 | 
 | ||||||
| # Build image | # Build image | ||||||
|  |  | ||||||
|  | @ -81,7 +81,7 @@ check_for() { | ||||||
| check_go_version() { | check_go_version() { | ||||||
|   echo -n "Checking 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)}') |   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 |   case $? in | ||||||
|     0) ;& |     0) ;& | ||||||
|     1) |     1) | ||||||
|  | @ -91,7 +91,7 @@ check_go_version() { | ||||||
|       ;; |       ;; | ||||||
|     2) |     2) | ||||||
|       printf "${RED}" |       printf "${RED}" | ||||||
|       echo "$GO_VERSION < 1.9" |       echo "$GO_VERSION < 1.10" | ||||||
|       exit 1 |       exit 1 | ||||||
|       ;; |       ;; | ||||||
|   esac |   esac | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue