Add state dir outputs for contract migration

This commit is contained in:
nolash 2021-09-29 06:39:39 +02:00
parent 58b890b971
commit d5392ff160
Signed by untrusted user who does not match committer: lash
GPG Key ID: 21D2E7BB88C2A746
3 changed files with 11 additions and 1 deletions

View File

@ -5,7 +5,13 @@ set -a
if [ -z $DEV_DATA_DIR ]; then
export DEV_DATA_DIR=`mktemp -d`
else
mkdir -p $DEV_DATA_DIR
mkdir -vp $DEV_DATA_DIR
fi
if [ -z $STATE_DIR ]; then
export STATE_DIR=/run/cic_init
mkdir -vp $STATE_DIR
echo 0 > $STATE_DIR/init
fi
if [ -z $DEV_CONFIG_RESET ]; then

View File

@ -117,6 +117,8 @@ export CIC_DEFAULT_TOKEN_SYMBOL=$CIC_DEFAULT_TOKEN_SYMBOL
export TOKEN_NAME=$TOKEN_NAME
" >> "${DEV_DATA_DIR}"/env_reset
echo -n $CIC_REGISTRY_ADDRESS > $STATE_DIR/registry
set +a
set +e

View File

@ -16,6 +16,7 @@ then
>&2 echo -e "\033[;31mFAILED\033[;39m RUN_MASK 1 - contract deployment"
exit 1;
fi
echo -n 1 > $STATE_DIR/init
>&2 echo -e "\033[;32mSUCCEEDED\033[;39m RUN_MASK 1 - contract deployment"
fi
@ -27,5 +28,6 @@ then
>&2 echo -e "\033[;31mFAILED\033[;39m RUN_MASK 2 - custodial service initialization"
exit 1;
fi
echo -n 2 > $STATE_DIR/init
>&2 echo -e "\033[;32mSUCCEEDED\033[;39m RUN_MASK 2 - custodial service initialization"
fi