Skip to content

Instantly share code, notes, and snippets.

@ForboleDevelopment
Created July 12, 2021 11:40
Show Gist options
  • Save ForboleDevelopment/614da0ace81874c6044c60a3114385a7 to your computer and use it in GitHub Desktop.
Save ForboleDevelopment/614da0ace81874c6044c60a3114385a7 to your computer and use it in GitHub Desktop.
Commands that should be run in order to update from morpheus-apollo-1 to morpheus-apollo-2 seamlessly
#!/bin/sh
echo '===> Stopping service'
sudo systemctl stop desmosd
echo '===> Building Desmos'
cd ~/desmos
git fetch --tags --force
git checkout tags/v0.17.2
make build install
echo '===> Updating Cosmovisor'
mv build/desmos ~/.desmos/cosmovisor/genesis/bin/desmos
rm ~/.desmos/cosmovisor/current
ln -sfn ~/.desmos/cosmovisor/current ~/.desmos/cosmovisor/genesis
rm -r ~/.desmos/cosmovisor/upgrades
CURRENT_VERSION="$(cosmovisor version)"
if [ $CURRENT_VERSION != "0.17.2" ]
then
echo 'Wrong Desmos version'
exit 1
fi
echo '===> Getting genesis.json'
rm ~/.desmos/config/genesis.json
curl 'https://raw.githubusercontent.com/desmos-labs/morpheus/master/morpheus-apollo-2/genesis.json' > ~/.desmos/config/genesis.json
cosmovisor unsafe-reset-all
echo '===> Restarting service'
sudo systemctl restart desmosd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment