Update Go and GolangCI-Lint
This commit is contained in:
		
							parent
							
								
									362cdf7713
								
							
						
					
					
						commit
						8d69d55de4
					
				|  | @ -1,10 +1,9 @@ | |||
| language: go | ||||
| go: | ||||
|   - 1.13.x | ||||
|   - 1.14.x | ||||
| install: | ||||
|   # Fetch dependencies | ||||
|   - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin v1.23.6 | ||||
|   - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin v1.24.0 | ||||
|   - GO111MODULE=on go mod download | ||||
| script: | ||||
|   - ./configure && make test | ||||
|  |  | |||
|  | @ -1,7 +1,7 @@ | |||
| FROM golang:1.14-buster AS builder | ||||
| 
 | ||||
| # Download tools | ||||
| RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.23.6 | ||||
| RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.24.0 | ||||
| 
 | ||||
| # Copy sources | ||||
| WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy | ||||
|  |  | |||
|  | @ -1,7 +1,7 @@ | |||
| FROM golang:1.14-buster AS builder | ||||
| 
 | ||||
| # Download tools | ||||
| RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.23.6 | ||||
| RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.24.0 | ||||
| 
 | ||||
| # Copy sources | ||||
| WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy | ||||
|  |  | |||
|  | @ -1,7 +1,7 @@ | |||
| FROM golang:1.14-buster AS builder | ||||
| 
 | ||||
| # Download tools | ||||
| RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.23.6 | ||||
| RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.24.0 | ||||
| 
 | ||||
| # Copy sources | ||||
| WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy | ||||
|  |  | |||
|  | @ -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.12 | ||||
|   vercomp $GO_VERSION 1.14 | ||||
|   case $? in | ||||
|     0) ;& | ||||
|     1) | ||||
|  | @ -91,7 +91,7 @@ check_go_version() { | |||
|       ;; | ||||
|     2) | ||||
|       printf "${RED}" | ||||
|       echo "$GO_VERSION < 1.12" | ||||
|       echo "$GO_VERSION < 1.14" | ||||
|       exit 1 | ||||
|       ;; | ||||
|   esac | ||||
|  |  | |||
							
								
								
									
										6
									
								
								dist.sh
								
								
								
								
							
							
						
						
									
										6
									
								
								dist.sh
								
								
								
								
							|  | @ -7,10 +7,10 @@ if [[ -z ${BINARY} ]] || [[ -z ${VERSION} ]]; then | |||
| 	exit 1 | ||||
| fi | ||||
| 
 | ||||
| # Check for Go version 1.13.* | ||||
| # Check for Go version 1.14.* | ||||
| GO_VERSION=$(go version | awk '{print $3}') | ||||
| if [[ ! "${GO_VERSION}" =~ ^go1.13.* ]]; then | ||||
| 	echo "Go version must be >= go1.13" | ||||
| if [[ ! "${GO_VERSION}" =~ ^go1.14.* ]]; then | ||||
| 	echo "Go version must be >= go1.14" | ||||
| 	exit 1 | ||||
| fi | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue