30 lines
1.0 KiB
Bash
Executable File
30 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
repository_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
|
|
cd "$repository_dir"
|
|
|
|
baseline_toolchain=${CONFIGKIT_BASELINE_TOOLCHAIN:?set CONFIGKIT_BASELINE_TOOLCHAIN to a cached supported Go 1.25 patch release}
|
|
|
|
run_go() {
|
|
local toolchain=$1
|
|
shift
|
|
GOTOOLCHAIN="$toolchain" GOPROXY=off go "$@"
|
|
}
|
|
|
|
if ! GOTOOLCHAIN="$baseline_toolchain" GOPROXY=off go version >/dev/null; then
|
|
printf 'release toolchain %s is unavailable; acquire it before validation\n' "$baseline_toolchain" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# Verbose output reports skipped cases without a separate evidence run.
|
|
run_go "$baseline_toolchain" test -mod=readonly -vet=off -race -v ./...
|
|
run_go "$baseline_toolchain" vet -mod=readonly ./...
|
|
|
|
# Only release-validated targets gate publication; macOS is best-effort.
|
|
for target in linux/amd64 linux/arm64; do
|
|
target_os=${target%/*}
|
|
target_arch=${target#*/}
|
|
GOTOOLCHAIN="$baseline_toolchain" GOPROXY=off CGO_ENABLED=0 GOOS="$target_os" GOARCH="$target_arch" go build -mod=readonly ./...
|
|
done
|