From b2007604beb20aeb0a7be8a4b9577bbf0f6f9c5b Mon Sep 17 00:00:00 2001 From: Alok Nikhil Date: Tue, 14 May 2024 16:00:48 -0700 Subject: [PATCH] Update to Go 1.22 --- .go-version | 2 +- Makefile | 8 +++----- cmd/build/Dockerfile | 2 +- go.mod | 2 +- go.sum | 2 ++ 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.go-version b/.go-version index 6597009..24b38a9 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.20.7 \ No newline at end of file +1.22.1 \ No newline at end of file diff --git a/Makefile b/Makefile index 30ae617..0b0deb3 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,17 @@ -GIT_USER?=$(shell gh api user -q ".login") # gets current user using github cli if the variable is not already set -GIT_TOKEN?=$(shell gh config get -h github.com oauth_token) # gets current user using github cli if the variable is not already set -DOCKER_PLATFORM=linux/amd64 +DOCKER_PLATFORM=linux/amd64,linux/arm64 +PROXY_VERSION=0.2 TESTCOVERAGE_THRESHOLD=0 REPO_ROOT=$(shell git rev-parse --show-toplevel) # Build info CGO_ENABLED=0 -GOPRIVATE=github.com/omnistrate .PHONY: all all: tidy build .PHONY: docker-build docker-build: - docker buildx build --platform=linux/amd64,linux/arm64 -f cmd/build/Dockerfile -t njnjyyh/omnistrate-generic-proxy:latest . --push + docker buildx build --platform=${DOCKER_PLATFORM} -f cmd/build/Dockerfile -t omnistrate/generic-proxy:${PROXY_VERSION} . --push .PHONY: tidy tidy: diff --git a/cmd/build/Dockerfile b/cmd/build/Dockerfile index 599fae0..6da2ea4 100644 --- a/cmd/build/Dockerfile +++ b/cmd/build/Dockerfile @@ -1,5 +1,5 @@ # Stage 1: Build -FROM golang:1.20.7-bullseye as builder +FROM golang:1.22-bullseye as builder ARG TARGETOS ARG TARGETARCH diff --git a/go.mod b/go.mod index 49f735a..b0fae85 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/omnistrate/pg-proxy -go 1.20 +go 1.22 require github.com/go-openapi/strfmt v0.21.7 diff --git a/go.sum b/go.sum index 278f8b6..f2ecdc0 100644 --- a/go.sum +++ b/go.sum @@ -12,6 +12,7 @@ github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -29,6 +30,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=