From c32c5631ce45fba951ee2898ad7ed33e41e9d74b Mon Sep 17 00:00:00 2001 From: Leopold Joy Date: Thu, 31 Oct 2019 18:44:39 +0100 Subject: [PATCH] update gaia_update.sh script for latest workflow --- gaia_update.sh | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/gaia_update.sh b/gaia_update.sh index aecf7eb..3701adf 100644 --- a/gaia_update.sh +++ b/gaia_update.sh @@ -2,11 +2,12 @@ # Give auth: chmod +x gaia_update.sh # Run: ./gaia_update.sh -# Update cosmos sdk repo -go get github.com/cosmos/cosmos-sdk +# Enter cosmos-sdk directory cd $HOME/go/src/github.com/cosmos/cosmos-sdk + +# Checkout latest release tag git fetch --all -git checkout -f v0.34.6 +git checkout -f v0.34.10 # Export GO env export GOPATH=$HOME/go @@ -14,7 +15,26 @@ export PATH=$GOPATH/bin:$PATH # Install make clean && make install + # Check if versions are correct after install with: `$HOME/go/bin/gaiad version --long` # and: `$HOME/go/bin/gaiacli version --long` + +# Stop the Systemd service +sudo systemctl stop gaiad.service + +# Optionally save old binaries: +# sudo mv /opt/go/bin/gaiad /opt/go/bin/gaiad0.34.9 +# sudo mv /opt/go/bin/gaiacli /opt/go/bin/gaiacli0.34.9 + +# Delete the old binaries sudo rm -rf /opt/go/bin/gaia* + +# Copy the newly built binaries over to the working directory sudo cp $HOME/go/bin/gaia* /opt/go/bin/ + +# Start the service again +sudo systemctl start gaiad.service + +# Print out (now) currently running versions +./gaiad version --long +./gaiacli version --long