-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated the templates, now version 3 is supported
Signed-off-by: Sanket Teli <[email protected]>
- Loading branch information
1 parent
bb1d407
commit c399ca8
Showing
14 changed files
with
517 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eu | ||
|
||
FABLO_NETWORK_ROOT="$(cd "$(dirname "$0")" && pwd)" | ||
|
||
source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh" | ||
source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh" | ||
source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh" | ||
source "$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh" | ||
source "$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh" | ||
source "$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh" | ||
source "$FABLO_NETWORK_ROOT/fabric-docker/.env" | ||
source "$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh" | ||
|
||
|
||
networkUp() { | ||
generateArtifacts | ||
startNetwork | ||
generateChannelsArtifacts | ||
installChannels | ||
installChaincodes | ||
printStartSuccessInfo | ||
} | ||
|
||
if [ "$1" = "up" ]; then | ||
networkUp | ||
elif [ "$1" = "down" ]; then | ||
networkDown | ||
elif [ "$1" = "reset" ]; then | ||
networkDown | ||
networkUp | ||
elif [ "$1" = "start" ]; then | ||
startNetwork | ||
elif [ "$1" = "stop" ]; then | ||
stopNetwork | ||
elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then | ||
installChaincodes | ||
elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then | ||
installChaincode "$3" "$4" | ||
elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then | ||
upgradeChaincode "$3" "$4" | ||
elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then | ||
runDevModeChaincode "$3" "$4" | ||
elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then | ||
chaincodeInvoke "$3" "$4" "$5" "$6" "$7" | ||
elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then | ||
chaincodeList "$3" "$4" | ||
elif [ "$1" = "channel" ]; then | ||
channelQuery "${@:2}" | ||
elif [ "$1" = "snapshot" ]; then | ||
createSnapshot "$2" | ||
elif [ "$1" = "clone-to" ]; then | ||
cloneSnapshot "$2" "${3:-""}" | ||
elif [ "$1" = "help" ]; then | ||
printHelp | ||
elif [ "$1" = "--help" ]; then | ||
printHelp | ||
else | ||
echo "No command specified" | ||
echo "Basic commands are: up, down, start, stop, reset" | ||
echo "To list channel query helper commands type: 'fablo channel --help'" | ||
echo "Also check: 'chaincode install'" | ||
echo "Use 'help' or '--help' for more information" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.