From e460e0173d73f3b72108e42437821f279cf19c38 Mon Sep 17 00:00:00 2001 From: Yann Hamon Date: Sun, 3 Sep 2023 23:53:01 +0200 Subject: [PATCH] Update Go and Goreleaser --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 7e020ebd..dad2cb16 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ local-test: go test -race ./... local-build: + git config --global --add safe.directory $$PWD go build -o bin/ ./... local-build-static: @@ -15,13 +16,13 @@ local-build-static: # These only used for development. Release artifacts and docker images are produced by goreleaser. docker-test: - docker run -t -v $$PWD:/go/src/github.com/yannh/kubeconform -w /go/src/github.com/yannh/kubeconform golang:1.17 make local-test + docker run -t -v $$PWD:/go/src/github.com/yannh/kubeconform -w /go/src/github.com/yannh/kubeconform golang:1.21 make local-test docker-build: - docker run -t -v $$PWD:/go/src/github.com/yannh/kubeconform -w /go/src/github.com/yannh/kubeconform golang:1.17 make local-build + docker run -t -v $$PWD:/go/src/github.com/yannh/kubeconform -w /go/src/github.com/yannh/kubeconform golang:1.21 make local-build docker-build-static: - docker run -t -v $$PWD:/go/src/github.com/yannh/kubeconform -w /go/src/github.com/yannh/kubeconform golang:1.17 make local-build-static + docker run -t -v $$PWD:/go/src/github.com/yannh/kubeconform -w /go/src/github.com/yannh/kubeconform golang:1.21 make local-build-static build-bats: docker build -t bats -f Dockerfile.bats . @@ -31,11 +32,11 @@ docker-acceptance: build-bats docker run --network none -t bats -p acceptance-nonetwork.bats goreleaser-build-static: - docker run -t -e GOOS=linux -e GOARCH=amd64 -v $$PWD:/go/src/github.com/yannh/kubeconform -w /go/src/github.com/yannh/kubeconform goreleaser/goreleaser:v1.11.5 build --single-target --skip-post-hooks --rm-dist --snapshot + docker run -t -e GOOS=linux -e GOARCH=amd64 -v $$PWD:/go/src/github.com/yannh/kubeconform -w /go/src/github.com/yannh/kubeconform goreleaser/goreleaser:v1.20.0 build --single-target --skip-post-hooks --rm-dist --snapshot cp dist/kubeconform_linux_amd64_v1/kubeconform bin/ release: - docker run -e GITHUB_TOKEN -e GIT_OWNER -t -v /var/run/docker.sock:/var/run/docker.sock -v $$PWD:/go/src/github.com/yannh/kubeconform -w /go/src/github.com/yannh/kubeconform goreleaser/goreleaser:v1.11.5 release --rm-dist + docker run -e GITHUB_TOKEN -e GIT_OWNER -t -v /var/run/docker.sock:/var/run/docker.sock -v $$PWD:/go/src/github.com/yannh/kubeconform -w /go/src/github.com/yannh/kubeconform goreleaser/goreleaser:v1.20.0 release --rm-dist update-deps: go get -u ./...