1
1
#! /bin/bash
2
2
3
- PREFERRED_GO_VERSION=go1.9.2
4
- SUPPORTED_GO_VERSIONS=' go1.[89 ]'
3
+ PREFERRED_GO_VERSION=go1.12.6
4
+ SUPPORTED_GO_VERSIONS=' go1.1[234 ]'
5
5
6
6
GO_PKG_DARWIN=${PREFERRED_GO_VERSION} .darwin-amd64.pkg
7
- GO_PKG_DARWIN_SHA=8b4f6ae6deae1150d2e341d02c247fd18a99af387516540eeb84702ffd76d3a1
7
+ GO_PKG_DARWIN_SHA=ea78245e43de2996fa0973033064b33f48820cfe39f4f3c6e953040925cc5815
8
8
9
9
GO_PKG_LINUX=${PREFERRED_GO_VERSION} .linux-amd64.tar.gz
10
- GO_PKG_LINUX_SHA=de874549d9a8d8d8062be05808509c09a88a248e77ec14eb77453530829ac02b
10
+ GO_PKG_LINUX_SHA=dbcf71a3c1ea53b8d54ef1b48c85a39a6c9a935d01fc8291ff2b92028e59913c
11
11
12
12
export ROOTDIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) /.." && pwd ) "
13
13
cd $ROOTDIR
14
14
15
15
# If Go isn't installed globally, setup environment variables for local install.
16
16
if [ -z " $( which go) " ] || [ -z " $( go version | grep " $SUPPORTED_GO_VERSIONS " ) " ]; then
17
- GODIR=" $ROOTDIR /.vendor/go19 "
17
+ GODIR=" $ROOTDIR /.vendor/golocal "
18
18
19
19
if [ $( uname -s) = " Darwin" ]; then
20
20
export GOROOT=" $GODIR /usr/local/go"
@@ -32,12 +32,12 @@ if [ -z "$(which go)" ] || [ -z "$(go version | grep "$SUPPORTED_GO_VERSIONS")"
32
32
cd " $GODIR " ;
33
33
34
34
if [ $( uname -s) = " Darwin" ]; then
35
- curl -L -O https://storage.googleapis .com/golang /$GO_PKG_DARWIN
35
+ curl -L -O https://dl.google .com/go /$GO_PKG_DARWIN
36
36
shasum -a256 $GO_PKG_DARWIN | grep $GO_PKG_DARWIN_SHA
37
37
xar -xf $GO_PKG_DARWIN
38
38
cpio -i < com.googlecode.go.pkg/Payload
39
39
else
40
- curl -L -O https://storage.googleapis .com/golang /$GO_PKG_LINUX
40
+ curl -L -O https://dl.google .com/go /$GO_PKG_LINUX
41
41
shasum -a256 $GO_PKG_LINUX | grep $GO_PKG_LINUX_SHA
42
42
tar xf $GO_PKG_LINUX
43
43
fi
0 commit comments