1
0
mirror of https://github.com/golang/go synced 2024-11-19 03:24:40 -07:00
go/dashboard/env/linux-x86-sid/scripts/build-go-builder.sh
Brad Fitzpatrick 551edbff13 dashboard: more environment cleanups
sid was trying to use hg still.

And remove curl everywhere (except nacl). It's unnecessary.

Change-Id: I2a235d83b2bc7cf599c8de5796c724d8f368348e
Reviewed-on: https://go-review.googlesource.com/1368
Reviewed-by: David Symonds <dsymonds@golang.org>
2014-12-12 05:59:31 +00:00

25 lines
725 B
Bash
Executable File

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 builder."}
: ${BUILDER_REV:?"need to be set to the go.tools repo revision for the builder."}
mkdir -p $GOROOT
git clone https://go.googlesource.com/go $GOROOT
(cd $GOROOT/src && git checkout $GO_REV && find && ./make.bash)
GO_TOOLS=$GOPATH/src/golang.org/x/tools
mkdir -p $GO_TOOLS
git clone https://go.googlesource.com/tools $GO_TOOLS
mkdir -p $PREFIX/bin
(cd $GO_TOOLS && git reset --hard $BUILDER_REV && GOBIN=$PREFIX/bin /goroot/bin/go install golang.org/x/tools/dashboard/builder)
rm -fR $GOROOT/bin $GOROOT/pkg $GOPATH
cd $GOROOT
git clean -f -d -x
git checkout master