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 <app name> <dao address>

e.g.

    scripts/upgrade.sh token 0xfoobar

The DAO address can also be set as environment variable
$KREDITS_DAO_ADDRESS
This commit is contained in:
bumi 2019-04-04 19:51:38 +02:00
parent db312dafbf
commit afbd114a36

23
scripts/upgrade.sh Executable file
View File

@ -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"