1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-04-21 12:17:22 +02:00

Update Go and GolangCI-Lint

This commit is contained in:
Joel Speed 2020-03-29 12:53:22 +01:00
parent 362cdf7713
commit 8d69d55de4
No known key found for this signature in database
GPG Key ID: 6E80578D6751DEFB
7 changed files with 12 additions and 13 deletions

View File

@ -1,10 +1,9 @@
language: go language: go
go: go:
- 1.13.x
- 1.14.x - 1.14.x
install: install:
# Fetch dependencies # 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 - GO111MODULE=on go mod download
script: script:
- ./configure && make test - ./configure && make test

View File

@ -1,7 +1,7 @@
FROM golang:1.14-buster AS builder FROM golang:1.14-buster AS builder
# Download tools # 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 # Copy sources
WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy

View File

@ -1,7 +1,7 @@
FROM golang:1.14-buster AS builder FROM golang:1.14-buster AS builder
# Download tools # 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 # Copy sources
WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy

View File

@ -1,7 +1,7 @@
FROM golang:1.14-buster AS builder FROM golang:1.14-buster AS builder
# Download tools # 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 # Copy sources
WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy

4
configure vendored
View File

@ -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.12 vercomp $GO_VERSION 1.14
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.12" echo "$GO_VERSION < 1.14"
exit 1 exit 1
;; ;;
esac esac

View File

@ -7,10 +7,10 @@ if [[ -z ${BINARY} ]] || [[ -z ${VERSION} ]]; then
exit 1 exit 1
fi fi
# Check for Go version 1.13.* # Check for Go version 1.14.*
GO_VERSION=$(go version | awk '{print $3}') GO_VERSION=$(go version | awk '{print $3}')
if [[ ! "${GO_VERSION}" =~ ^go1.13.* ]]; then if [[ ! "${GO_VERSION}" =~ ^go1.14.* ]]; then
echo "Go version must be >= go1.13" echo "Go version must be >= go1.14"
exit 1 exit 1
fi fi

2
go.mod
View File

@ -1,6 +1,6 @@
module github.com/pusher/oauth2_proxy module github.com/pusher/oauth2_proxy
go 1.13 go 1.14
require ( require (
github.com/BurntSushi/toml v0.3.1 github.com/BurntSushi/toml v0.3.1