mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-09-05 15:47:02 +00:00
Merge branch 'main' into dependabot/go_modules/hack/update-go-mod/golang.org/x/mod-0.33.0
This commit is contained in:
@@ -16,8 +16,8 @@
|
||||
# See https://go.googlesource.com/go/+/dev.boringcrypto/README.boringcrypto.md
|
||||
# and https://kupczynski.info/posts/fips-golang/ for details.
|
||||
|
||||
ARG BUILD_IMAGE=golang:1.25.7@sha256:011d6e21edbc198b7aeb06d705f17bc1cc219e102c932156ad61db45005c5d31
|
||||
ARG BASE_IMAGE=gcr.io/distroless/static:nonroot@sha256:f9f84bd968430d7d35e8e6d55c40efb0b980829ec42920a49e60e65eac0d83fc
|
||||
ARG BUILD_IMAGE=golang:1.26.0@sha256:c83e68f3ebb6943a2904fa66348867d108119890a2c6a2e6f07b38d0eb6c25c5
|
||||
ARG BASE_IMAGE=gcr.io/distroless/static:nonroot@sha256:01e550fdb7ab79ee7be5ff440a563a58f1fd000ad9e0c532e65c3d23f917f1c5
|
||||
|
||||
# This is not currently using --platform to prepare to cross-compile because we use gcc below to build
|
||||
# platform-specific GCO code. This makes multi-arch builds slow due to target platform emulation.
|
||||
|
||||
+6
-11
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright 2022-2025 the Pinniped contributors. All Rights Reserved.
|
||||
# Copyright 2022-2026 the Pinniped contributors. All Rights Reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -euo pipefail
|
||||
@@ -13,19 +13,14 @@ go version
|
||||
|
||||
lint_version="v$(cat hack/lib/lint-version.txt)"
|
||||
|
||||
# Find the toolchain version from our go.mod file. "go install" pays attention to $GOTOOLCHAIN.
|
||||
GOTOOLCHAIN=$(sed -rn 's/^toolchain (go[0-9\.]+)$/\1/p' go.mod)
|
||||
# Find the Go version from our Dockerfile. "go install" pays attention to $GOTOOLCHAIN.
|
||||
GOTOOLCHAIN=$(sed -rn 's/^ARG BUILD_IMAGE=golang:([0-9\.]+)@sha256:.*$/\1/p' Dockerfile)
|
||||
if [[ -z "$GOTOOLCHAIN" ]]; then
|
||||
# Did not find toolchain directive. The directive is not needed in a go.mod file when it would be the same
|
||||
# version as the go directive, so it will not always be there. Try using go directive instead.
|
||||
GOTOOLCHAIN=$(sed -rn 's/^go ([0-9]+\.[0-9]+\.[0-9]+)$/\1/p' go.mod)
|
||||
if [[ -z "$GOTOOLCHAIN" ]]; then
|
||||
echo "ERROR: Could not find Go patch version from go.mod file."
|
||||
exit 1
|
||||
fi
|
||||
GOTOOLCHAIN="go${GOTOOLCHAIN}"
|
||||
echo "ERROR: Could not find Go patch version from Dockerfile."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
GOTOOLCHAIN="go${GOTOOLCHAIN}"
|
||||
export GOTOOLCHAIN
|
||||
|
||||
echo "Installing golangci-lint@${lint_version} using toolchain ${GOTOOLCHAIN}"
|
||||
|
||||
@@ -1 +1 @@
|
||||
2.7.2
|
||||
2.9.0
|
||||
|
||||
Reference in New Issue
Block a user