mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-26 11:35:10 +00:00
Get label for chaincode from metadata.json
Signed-off-by: Matthew B White <whitemat@uk.ibm.com>
This commit is contained in:
parent
5355fb1b39
commit
0ea5e7762b
1 changed files with 3 additions and 1 deletions
|
|
@ -139,7 +139,9 @@ function invoke_chaincode() {
|
||||||
function set_chaincode_id() {
|
function set_chaincode_id() {
|
||||||
local cc_sha256=$(shasum -a 256 build/chaincode/${CHAINCODE_NAME}.tgz | tr -s ' ' | cut -d ' ' -f 1)
|
local cc_sha256=$(shasum -a 256 build/chaincode/${CHAINCODE_NAME}.tgz | tr -s ' ' | cut -d ' ' -f 1)
|
||||||
|
|
||||||
CHAINCODE_ID=${CHAINCODE_LABEL}:${cc_sha256}
|
local label=$( jq -r '.label' chaincode/${CHAINCODE_NAME}/metadata.json)
|
||||||
|
|
||||||
|
CHAINCODE_ID=${label}:${cc_sha256}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Package and install the chaincode, but do not activate.
|
# Package and install the chaincode, but do not activate.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue