delve/_scripts/test_mac.sh

30 lines
512 B
Bash
Raw Normal View History

#!/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
cd -
fi
mkdir -p $TMPDIR/gopath
export GOROOT="$TMPDIR/go"
export GOPATH="$TMPDIR/gopath"
export GOARCH="$ARCH"
export PATH="$GOROOT/bin:$PATH"
make test