From 1c46145be77abced076f12021b42ce494294ef4b Mon Sep 17 00:00:00 2001 From: w1t <1955451+w1t@users.noreply.github.com> Date: Wed, 4 Dec 2019 03:17:57 -0800 Subject: [PATCH] networks/remote: turn on GO111MODULE and use git clone instead of go get (#4203) To execute the integration.sh, you need to run "source ./integration.sh". just execute command "./integration.sh" will not work. It is because "source ~/.profile" executes in a separate shell than the integration.sh script # **turn on the go module, default is auto. The value is off, if tendermint source code #is downloaded under $GOPATH/src directory echo "export GO111MODULE=on" >> ~/.profile # ** use git clone instead of go get. # once go module is on, go get will download source code to # specific version directory under $GOPATH/pkg/mod the make # script will not work git clone https://github.com/tendermint/tendermint.git #** need to install the package, otherwise tendermint testnet will not execute make install --- networks/remote/integration.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/networks/remote/integration.sh b/networks/remote/integration.sh index 6ff02cb6f..ca773012d 100644 --- a/networks/remote/integration.sh +++ b/networks/remote/integration.sh @@ -3,7 +3,7 @@ # XXX: this script is intended to be run from a fresh Digital Ocean droplet # NOTE: you must set this manually now -echo "export DO_API_TOKEN=\"yourToken\"" >> ~/.profile +echo "export DO_API_TOKEN=\"yourtoken\"" >> ~/.profile sudo apt-get update -y sudo apt-get upgrade -y @@ -21,17 +21,25 @@ echo "export PATH=\$PATH:/usr/local/go/bin" >> ~/.profile mkdir goApps echo "export GOPATH=/root/goApps" >> ~/.profile echo "export PATH=\$PATH:\$GOPATH/bin" >> ~/.profile +# **turn on the go module, default is auto. The value is off, if tendermint source code +#is downloaded under $GOPATH/src directory +echo "export GO111MODULE=on" >> ~/.profile source ~/.profile -## get the code and move into repo -REPO=github.com/tendermint/tendermint -go get $REPO -cd $GOPATH/src/$REPO - +mkdir -p $GOPATH/src/github.com/tendermint +cd $GOPATH/src/github.com/tendermint +# ** use git clone instead of go get. +# once go module is on, go get will download source code to +# specific version directory under $GOPATH/pkg/mod the make +# script will not work +git clone https://github.com/tendermint/tendermint.git +cd tendermint ## build make tools make build +#** need to install the package, otherwise terdermint testnet will not execute +make install # generate an ssh key ssh-keygen -f $HOME/.ssh/id_rsa -t rsa -N ''