Get label for chaincode from metadata.json (#509)

Signed-off-by: Matthew B White <whitemat@uk.ibm.com>
This commit is contained in:
Matthew B White 2021-11-22 13:25:38 +00:00 committed by GitHub
parent 3d17cf066d
commit a97e8d1267
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -157,7 +157,9 @@ function set_chaincode_id() {
local cc_package=build/chaincode/${CHAINCODE_NAME}.tgz
cc_sha256=$(shasum -a 256 ${cc_package} | tr -s ' ' | cut -d ' ' -f 1)
CHAINCODE_ID=${CHAINCODE_LABEL}:${cc_sha256}
label=$( jq -r '.label' chaincode/${CHAINCODE_NAME}/metadata.json)
CHAINCODE_ID=${label}:${cc_sha256}
}
# Package and install the chaincode, but do not activate.