2014-12-01 10:59:02 -07:00
|
|
|
set -ex
|
|
|
|
|
|
|
|
export GOPATH=/gopath
|
|
|
|
export GOROOT=/goroot
|
|
|
|
PREFIX=/usr/local
|
|
|
|
: ${GO_REV:?"need to be set to the golang repo revision used to build the commit watcher."}
|
|
|
|
: ${WATCHER_REV:?"need to be set to the go.tools repo revision for the commit watcher."}
|
|
|
|
|
|
|
|
mkdir -p $GOROOT
|
2014-12-11 17:39:44 -07:00
|
|
|
git clone https://go.googlesource.com/go $GOROOT
|
|
|
|
(cd $GOROOT/src && git reset --hard $GO_REV && find && ./make.bash)
|
2014-12-01 10:59:02 -07:00
|
|
|
|
|
|
|
GO_TOOLS=$GOPATH/src/golang.org/x/tools
|
|
|
|
mkdir -p $GO_TOOLS
|
2014-12-11 17:39:44 -07:00
|
|
|
git clone https://go.googlesource.com/tools $GO_TOOLS
|
2014-12-01 10:59:02 -07:00
|
|
|
|
|
|
|
mkdir -p $PREFIX/bin
|
2014-12-11 17:39:44 -07:00
|
|
|
(cd $GO_TOOLS && git reset --hard $WATCHER_REV && GOBIN=$PREFIX/bin /goroot/bin/go install golang.org/x/tools/dashboard/watcher)
|
2014-12-01 10:59:02 -07:00
|
|
|
|
|
|
|
rm -fR $GOROOT/bin $GOROOT/pkg $GOPATH
|