Merge pull request #46326 from thaJeztah/23.0_backport_hack_less_redirects

[23.0 backport] Dockerfile: Windows: update Golang download domains to cut down redirects
This commit is contained in:
Sebastiaan van Stijn 2023-08-25 14:49:00 +02:00 committed by GitHub
commit 290158c7bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -224,7 +224,7 @@ RUN `
`
Write-Host INFO: Downloading go...; `
$dlGoVersion=$Env:GO_VERSION -replace '\.0$',''; `
Download-File "https://golang.org/dl/go${dlGoVersion}.windows-amd64.zip" C:\go.zip; `
Download-File "https://go.dev/dl/go${dlGoVersion}.windows-amd64.zip" C:\go.zip; `
`
Write-Host INFO: Downloading compiler 1 of 3...; `
Download-File https://raw.githubusercontent.com/moby/docker-tdmgcc/master/gcc.zip C:\gcc.zip; `

View file

@ -464,7 +464,7 @@ Try {
if (-not $inContainer) { Verify-GoVersion }
# Verify GOPATH is set
if ($env:GOPATH.Length -eq 0) { Throw "Missing GOPATH environment variable. See https://golang.org/doc/code.html#GOPATH" }
if ($env:GOPATH.Length -eq 0) { Throw "Missing GOPATH environment variable. See https://pkg.go.dev/cmd/go#hdr-GOPATH_environment_variable" }
# Run autogen if building daemon.
if ($Daemon) {

View file

@ -79,7 +79,7 @@ if [ "$AUTO_GOPATH" ]; then
fi
if [ ! "$GOPATH" ]; then
echo >&2 'error: missing GOPATH; please see https://golang.org/doc/code.html#GOPATH'
echo >&2 'error: missing GOPATH; please see https://pkg.go.dev/cmd/go#hdr-GOPATH_environment_variable'
echo >&2 ' alternatively, set AUTO_GOPATH=1'
exit 1
fi