forked from hyperledger/fabric-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-6214] Make target to generate channel artifacts
Change-Id: I9da52a99b2e4a124dde7335f13df663caafda297 Signed-off-by: Divyank Katira <[email protected]>
- Loading branch information
Showing
12 changed files
with
42 additions
and
8 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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,29 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright SecureKey Technologies Inc. All Rights Reserved. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
declare -a channels=("mychannel" "orgchannel" "testchannel") | ||
declare -a orgs=("Org1MSP" "Org2MSP") | ||
|
||
export CHANNEL_DIR="/opt/gopath/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/channel" | ||
export FABRIC_CFG_PATH=${CHANNEL_DIR} | ||
|
||
echo "Generating Orderer Genesis block" | ||
configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ${CHANNEL_DIR}/twoorgs.genesis.block | ||
|
||
for i in "${channels[@]}" | ||
do | ||
echo "Generating artifacts for channel: $i" | ||
|
||
echo "Generating channel configuration transaction" | ||
configtxgen -profile TwoOrgsChannel -outputCreateChannelTx .${CHANNEL_DIR}/${i}.tx -channelID $i | ||
|
||
for j in "${orgs[@]}" | ||
do | ||
echo "Generating anchor peer update for org $j" | ||
configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ${CHANNEL_DIR}/${i}${j}anchors.tx -channelID $i -asOrg $j | ||
done | ||
done |