From afbd114a3617205586373a8fdde1ea751c97623d Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Thu, 4 Apr 2019 19:51:38 +0200 Subject: [PATCH] Add app upgrade helper script This script deploys a new app version, upgrades the given DAO to the latest version of that app and builds the ABI files for the wrapper. usage: scripts/upgrade.sh e.g. scripts/upgrade.sh token 0xfoobar The DAO address can also be set as environment variable $KREDITS_DAO_ADDRESS --- scripts/upgrade.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 scripts/upgrade.sh diff --git a/scripts/upgrade.sh b/scripts/upgrade.sh new file mode 100755 index 0000000..6067dfc --- /dev/null +++ b/scripts/upgrade.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -e + +rootDir=`pwd` + +app=$1 +daoAddress=$2 +if [ -z "$VAR" ]; then + daoAddress=$KREDITS_DAO_ADDRESS +fi + +echo "## Deploying $app for $daoAddress" + +set -x +cd "apps/$app" +aragon apm publish major +cd $rootDir +aragon dao upgrade $daoAddress kredits-$app +npm run build-json +set +x + +echo "Done"