From bb0e17dbf0ad57daba985123fa4532ebd61ba3ca Mon Sep 17 00:00:00 2001 From: Zach Date: Wed, 14 Nov 2018 05:17:07 -0500 Subject: [PATCH] arm: add install script, fix Makefile (#2824) * be like the SDK makefile * arm: add install script, fix Makefile * ... --- .circleci/config.yml | 1 + Makefile | 5 ++- scripts/install/install_tendermint_arm.sh | 46 +++++++++++++++++++++++ 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 scripts/install/install_tendermint_arm.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 55a3da4f9..0de4a1791 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -92,6 +92,7 @@ jobs: command: | export PATH="$GOBIN:$PATH" make get_tools + make get_dev_tools - run: name: dependencies command: | diff --git a/Makefile b/Makefile index 4390b1fbb..294a319b3 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,6 @@ all: check build test install check: check_tools get_vendor_deps - ######################################## ### Build Tendermint @@ -79,6 +78,8 @@ check_tools: get_tools: @echo "--> Installing tools" ./scripts/get_tools.sh + +get_dev_tools: @echo "--> Downloading linters (this may take awhile)" $(GOPATH)/src/github.com/alecthomas/gometalinter/scripts/install.sh -b $(GOBIN) @@ -327,4 +328,4 @@ build-slate: # To avoid unintended conflicts with file names, always add to .PHONY # unless there is a reason not to. # https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html -.PHONY: check build build_race build_abci dist install install_abci check_dep check_tools get_tools update_tools get_vendor_deps draw_deps get_protoc protoc_abci protoc_libs gen_certs clean_certs grpc_dbserver test_cover test_apps test_persistence test_p2p test test_race test_integrations test_release test100 vagrant_test fmt rpc-docs build-linux localnet-start localnet-stop build-docker build-docker-localnode sentry-start sentry-config sentry-stop build-slate protoc_grpc protoc_all +.PHONY: check build build_race build_abci dist install install_abci check_dep check_tools get_tools get_dev_tools update_tools get_vendor_deps draw_deps get_protoc protoc_abci protoc_libs gen_certs clean_certs grpc_dbserver test_cover test_apps test_persistence test_p2p test test_race test_integrations test_release test100 vagrant_test fmt rpc-docs build-linux localnet-start localnet-stop build-docker build-docker-localnode sentry-start sentry-config sentry-stop build-slate protoc_grpc protoc_all diff --git a/scripts/install/install_tendermint_arm.sh b/scripts/install/install_tendermint_arm.sh new file mode 100644 index 000000000..df27fbfc3 --- /dev/null +++ b/scripts/install/install_tendermint_arm.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +# XXX: this script is intended to be run from +# a fresh Digital Ocean droplet with Ubuntu + +# upon its completion, you must either reset +# your terminal or run `source ~/.profile` + +# as written, this script will install +# tendermint core from master branch +REPO=github.com/tendermint/tendermint + +# change this to a specific release or branch +BRANCH=master + +sudo apt-get update -y + +# get and unpack golang +curl -O https://storage.googleapis.com/golang/go1.11.2.linux-armv6l.tar.gz +tar -xvf go1.11.2.linux-armv6l.tar.gz + +# move go folder and add go binary to path +sudo mv go /usr/local +echo "export PATH=\$PATH:/usr/local/go/bin" >> ~/.profile + +# create the goApps directory, set GOPATH, and put it on PATH +mkdir goApps +echo "export GOPATH=$HOME/goApps" >> ~/.profile +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 +git checkout $BRANCH +# XXX: uncomment if branch isn't master +# git fetch origin $BRANCH +make get_tools +make get_vendor_deps +make install + +# the binary is located in $GOPATH/bin +# run `source ~/.profile` or reset your terminal +# to persist the changes