TeamCity: fix scripts selecting Go version (#2804)

s/golang.org/go.dev/
This commit is contained in:
Alessandro Arzilli 2021-11-24 22:09:43 +01:00 committed by GitHub
parent cba1a524a8
commit 389cccf08b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

@ -19,7 +19,7 @@ def splitver(x):
return v
ver = sys.argv[1]
d = json.loads(urllib.urlopen('https://golang.org/dl/?mode=json&include=all').read())
d = json.loads(urllib.urlopen('https://go.dev/dl/?mode=json&include=all').read())
ds = sorted(d, reverse=True, key=lambda it: splitver(it['version'][2:]))
for x in ds:
if x['version'][:len(ver)] == ver:

@ -26,7 +26,7 @@ if [ "$version" = "gotip" ]; then
exit 0
fi
echo Building Go from tip
getgo $(curl https://golang.org/VERSION?m=text)
getgo $(curl https://go.dev/VERSION?m=text)
export GOROOT_BOOTSTRAP=$GOROOT
export GOROOT=/usr/local/go/go-tip
git clone https://go.googlesource.com/go /usr/local/go/go-tip
@ -35,7 +35,7 @@ if [ "$version" = "gotip" ]; then
cd -
else
echo Finding latest patch version for $version
version=$(curl 'https://golang.org/dl/?mode=json&include=all' | jq '.[].version' --raw-output | egrep ^$version'($|\.|beta|rc)' | sort -rV | head -1)
version=$(curl 'https://go.dev/dl/?mode=json&include=all' | jq '.[].version' --raw-output | egrep ^$version'($|\.|beta|rc)' | sort -rV | head -1)
echo "Go $version on $arch"
getgo $version
fi

@ -12,7 +12,7 @@ if [ "$GOVERSION" = "gotip" ]; then
if [ "$arch" != "amd64" ]; then
exit 0
fi
bootstrapver=$(curl https://golang.org/VERSION?m=text)
bootstrapver=$(curl https://go.dev/VERSION?m=text)
cd $TMPDIR
curl -sSL "https://storage.googleapis.com/golang/$bootstrapver.darwin-$ARCH.tar.gz" | tar -xz
cd -