mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Go maintainers started to unconditionally update the minimum go version for golang.org/x/ dependencies to go1.23, which means that we'll no longer be able to support any version below that when updating those dependencies; > all: upgrade go directive to at least 1.23.0 [generated] > > By now Go 1.24.0 has been released, and Go 1.22 is no longer supported > per the Go Release Policy (https://go.dev/doc/devel/release#policy). > > For golang/go#69095. This updates our minimum version to go1.23, as we won't be able to maintain compatibility with older versions because of the above. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
34 lines
934 B
Bash
Executable File
34 lines
934 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# This script is used to coerce certain commands which rely on the presence of
|
|
# a go.mod into working with our repository. It works by creating a fake
|
|
# go.mod, running a specified command (passed via arguments), and removing it
|
|
# when the command is finished. This script should be dropped when this
|
|
# repository is a proper Go module with a permanent go.mod.
|
|
|
|
set -e
|
|
|
|
SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
ROOTDIR="$(cd "${SCRIPTDIR}/.." && pwd)"
|
|
|
|
if test -e "${ROOTDIR}/go.mod"; then
|
|
{
|
|
scriptname=$(basename "$0")
|
|
cat >&2 <<- EOF
|
|
$scriptname: WARN: go.mod exists in the repository root!
|
|
$scriptname: WARN: Using your go.mod instead of our generated version -- this may misbehave!
|
|
EOF
|
|
} >&2
|
|
else
|
|
set -x
|
|
|
|
tee "${ROOTDIR}/go.mod" >&2 <<- EOF
|
|
module github.com/docker/docker
|
|
|
|
go 1.23.0
|
|
EOF
|
|
trap 'rm -f "${ROOTDIR}/go.mod"' EXIT
|
|
fi
|
|
|
|
GO111MODULE=on GOTOOLCHAIN=local "$@"
|