2021-02-23 10:16:23 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -x
|
|
|
|
set -e
|
|
|
|
|
|
|
|
GOVERSION=$1
|
|
|
|
ARCH=$2
|
|
|
|
TMPDIR=$3
|
|
|
|
|
|
|
|
if [ "$GOVERSION" = "gotip" ]; then
|
|
|
|
git clone https://go.googlesource.com/go $TMPDIR/go
|
|
|
|
export GOROOT_BOOTSTRAP=$GOROOT
|
|
|
|
cd $TMPDIR/go/src
|
|
|
|
./make.bash
|
|
|
|
cd -
|
|
|
|
else
|
|
|
|
cd $TMPDIR
|
2021-02-24 09:00:33 +00:00
|
|
|
curl -sSL "https://storage.googleapis.com/golang/$GOVERSION.darwin-$ARCH.tar.gz" | tar -vxz
|
2021-02-23 10:16:23 +00:00
|
|
|
cd -
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p $TMPDIR/gopath
|
|
|
|
|
|
|
|
export GOROOT="$TMPDIR/go"
|
|
|
|
export GOPATH="$TMPDIR/gopath"
|
|
|
|
export GOARCH="$ARCH"
|
|
|
|
export PATH="$GOROOT/bin:$PATH"
|
|
|
|
|
|
|
|
make test
|