kleros/kleros-v2

View on GitHub
services/graph-node/bin/deploy

Summary

Maintainability
Test Coverage
#! /bin/bash

if [ $# != 3 ]; then
    echo "usage: deploy <name> <ipfs_hash> <node>"
    exit 1
fi

api="http://index-node.default/"

echo "Deploying $1 (deployment $2)"
data=$(printf '{"jsonrpc": "2.0", "method": "subgraph_deploy", "params": {"name":"%s", "ipfs_hash":"%s", "node_id":"%s"}, "id":"1"}' "$1" "$2" "$3")
curl -s -H "content-type: application/json" --data "$data" "$api"