TeamCity: fix scripts selecting Go version (#2804)
s/golang.org/go.dev/
This commit is contained in:
parent
cba1a524a8
commit
389cccf08b
@ -19,7 +19,7 @@ def splitver(x):
|
|||||||
return v
|
return v
|
||||||
|
|
||||||
ver = sys.argv[1]
|
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:]))
|
ds = sorted(d, reverse=True, key=lambda it: splitver(it['version'][2:]))
|
||||||
for x in ds:
|
for x in ds:
|
||||||
if x['version'][:len(ver)] == ver:
|
if x['version'][:len(ver)] == ver:
|
||||||
|
@ -26,7 +26,7 @@ if [ "$version" = "gotip" ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
echo Building Go from tip
|
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_BOOTSTRAP=$GOROOT
|
||||||
export GOROOT=/usr/local/go/go-tip
|
export GOROOT=/usr/local/go/go-tip
|
||||||
git clone https://go.googlesource.com/go /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 -
|
cd -
|
||||||
else
|
else
|
||||||
echo Finding latest patch version for $version
|
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"
|
echo "Go $version on $arch"
|
||||||
getgo $version
|
getgo $version
|
||||||
fi
|
fi
|
||||||
|
@ -12,7 +12,7 @@ if [ "$GOVERSION" = "gotip" ]; then
|
|||||||
if [ "$arch" != "amd64" ]; then
|
if [ "$arch" != "amd64" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
bootstrapver=$(curl https://golang.org/VERSION?m=text)
|
bootstrapver=$(curl https://go.dev/VERSION?m=text)
|
||||||
cd $TMPDIR
|
cd $TMPDIR
|
||||||
curl -sSL "https://storage.googleapis.com/golang/$bootstrapver.darwin-$ARCH.tar.gz" | tar -xz
|
curl -sSL "https://storage.googleapis.com/golang/$bootstrapver.darwin-$ARCH.tar.gz" | tar -xz
|
||||||
cd -
|
cd -
|
||||||
|
Loading…
Reference in New Issue
Block a user