Skip to content

Commit

Permalink
Improve script and update submoduke
Browse files Browse the repository at this point in the history
Co-authored-by: Jason Smythe <[email protected]>
  • Loading branch information
marvinkruse and JasoonS committed Sep 17, 2020
1 parent 6249bce commit 43afdae
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion contracts
16 changes: 7 additions & 9 deletions start_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
RPC_ENDPOINT="http://localhost:8545"
TOTAL_WAITING_TIME=45 # seconds
WAIT_FOR_INPUT=true
ROOT_DIR=$(pwd)
######################

function killCompose {
kill $DOCKER_COMPOSE_UP_PID
sleep 1
kill $DOCKER_COMPOSE_UP_PID
cd $ROOT_DIR
docker-compose down -v
}

function killAndExit {
Expand All @@ -22,22 +22,20 @@ function killAndExit {

function graphCreate {
echo '####### DEPLOYING GRAPH #######'
cd wildcards-subgraph && yarn codegen && yarn build && yarn create-local && yarn deploy-local
cd wildcards-subgraph && yarn codegen && yarn create-local && yarn deploy-local
if [ "$?" -ne 0 ];
then
echo "ERROR: Could not deploy graph successfully"
killAndExit
echo "ERROR: Could not deploy graph successfully - please fix graph errors and press 'g'"
fi
cd ..
}

function graphRedeploy {
echo '####### REDEPLOYING GRAPH #######'
cd wildcards-subgraph && yarn codegen && yarn build && yarn deploy-local
cd wildcards-subgraph && yarn codegen && yarn deploy-local
if [ "$?" -ne 0 ];
then
echo "ERROR: Could not redeploy graph successfully"
# killAndExit
echo "ERROR: Could not redeploy graph successfully - please fix graph errors and press 'g'"
fi
cd ..
}
Expand Down
2 changes: 1 addition & 1 deletion wildcards-subgraph

0 comments on commit 43afdae

Please sign in to comment.