2018-05-31 08:03:02 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# XXX: this script is intended to be run from
|
|
|
|
# a fresh Digital Ocean droplet with Ubuntu
|
|
|
|
|
|
|
|
# change this to a specific release or branch
|
2018-11-14 11:05:48 -08:00
|
|
|
BRANCH=master
|
2018-11-14 12:14:13 -08:00
|
|
|
REPO=github.com/cosmos/cosmos-sdk
|
|
|
|
|
2019-01-31 17:20:58 -08:00
|
|
|
GO_VERSION=1.11.5
|
2018-05-31 08:03:02 -07:00
|
|
|
|
|
|
|
sudo apt-get update -y
|
|
|
|
sudo apt-get upgrade -y
|
|
|
|
sudo apt-get install -y make
|
|
|
|
|
|
|
|
# get and unpack golang
|
2018-11-14 12:14:13 -08:00
|
|
|
curl -O https://dl.google.com/go/go$GO_VERSION.linux-amd64.tar.gz
|
|
|
|
tar -xvf go$GO_VERSION.linux-amd64.tar.gz
|
2018-05-31 08:03:02 -07:00
|
|
|
|
|
|
|
# move go binary and add to path
|
|
|
|
mv go /usr/local
|
|
|
|
echo "export PATH=\$PATH:/usr/local/go/bin" >> ~/.profile
|
|
|
|
|
2018-11-13 22:05:15 -08:00
|
|
|
# create the go directory, set GOPATH, and put it on PATH
|
|
|
|
mkdir go
|
2018-11-28 08:52:07 -08:00
|
|
|
echo "export GOPATH=$HOME/go" >> ~/.profile
|
2018-05-31 08:03:02 -07:00
|
|
|
echo "export PATH=\$PATH:\$GOPATH/bin" >> ~/.profile
|
|
|
|
|
|
|
|
source ~/.profile
|
|
|
|
|
|
|
|
# get the code and move into repo
|
|
|
|
go get $REPO
|
|
|
|
cd $GOPATH/src/$REPO
|
|
|
|
|
|
|
|
# build & install master
|
|
|
|
git checkout $BRANCH
|
2018-12-20 10:03:59 -08:00
|
|
|
LEDGER_ENABLED=false make tools
|
2018-11-13 22:05:15 -08:00
|
|
|
LEDGER_ENABLED=false make get_vendor_deps
|
|
|
|
LEDGER_ENABLED=false make install
|
|
|
|
|
2018-11-14 12:14:13 -08:00
|
|
|
source ~/.profile
|