From 25cbfeec5066ebfd6f80a42e6255b368a24886f9 Mon Sep 17 00:00:00 2001 From: SurbhiAgarwal1 Date: Fri, 17 Apr 2026 21:04:21 +0530 Subject: [PATCH] Improve packageCC.sh robustness with build verification and finalize ledger-queries Java/TS support --- README.md | 2 +- test-network/scripts/packageCC.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b94ea128..933495cc 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ transfer an asset in a more realistic transfer scenario. | **Smart Contract** | **Description** | **Tutorial** | **Smart contract languages** | **Application languages** | | -----------|------------------------------|----------|---------|---------| | [Basic](asset-transfer-basic) | The Basic sample smart contract that allows you to create and transfer an asset by putting data on the ledger and retrieving it. This sample is recommended for new Fabric users. | [Writing your first application](https://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html) | Go, JavaScript, TypeScript, Java | Go, TypeScript, Java | -| [Ledger queries](asset-transfer-ledger-queries) | The ledger queries sample demonstrates range queries and transaction updates using range queries (applicable for both LevelDB and CouchDB state databases), and how to deploy an index with your chaincode to support JSON queries (applicable for CouchDB state database only). | [Using CouchDB](https://hyperledger-fabric.readthedocs.io/en/latest/couchdb_tutorial.html) | Go, JavaScript, Java, TypeScript | Go, TypeScript, Java, JavaScript | +| [Ledger queries](asset-transfer-ledger-queries) | The ledger queries sample demonstrates range queries and transaction updates using range queries (applicable for both LevelDB and CouchDB state databases), and how to deploy an index with your chaincode to support JSON queries (applicable for CouchDB state database only). | [Using CouchDB](https://hyperledger-fabric.readthedocs.io/en/latest/couchdb_tutorial.html) | Go, JavaScript, Java, TypeScript | Java, JavaScript | | [Private data](asset-transfer-private-data) | This sample demonstrates the use of private data collections, how to manage private data collections with the chaincode lifecycle, and how the private data hash can be used to verify private data on the ledger. It also demonstrates how to control asset updates and transfers using client-based ownership and access control. | [Using Private Data](https://hyperledger-fabric.readthedocs.io/en/latest/private_data_tutorial.html) | Go, TypeScript, Java | TypeScript | | [State-Based Endorsement](asset-transfer-sbe) | This sample demonstrates how to override the chaincode-level endorsement policy to set endorsement policies at the key-level (data/asset level). | [Using State-based endorsement](https://github.com/hyperledger/fabric-samples/tree/main/asset-transfer-sbe) | Java, TypeScript | JavaScript | | [Secured agreement](asset-transfer-secured-agreement) | Smart contract that uses implicit private data collections, state-based endorsement, and organization-based ownership and access control to keep data private and securely transfer an asset with the consent of both the current owner and buyer. | [Secured asset transfer](https://hyperledger-fabric.readthedocs.io/en/latest/secured_asset_transfer/secured_private_asset_transfer_tutorial.html) | Go | TypeScript | diff --git a/test-network/scripts/packageCC.sh b/test-network/scripts/packageCC.sh index 75c3ff55..bc9c9d4b 100755 --- a/test-network/scripts/packageCC.sh +++ b/test-network/scripts/packageCC.sh @@ -51,7 +51,9 @@ elif [ "$CC_SRC_LANGUAGE" = "java" ]; then infoln "Compiling Java code..." pushd $CC_SRC_PATH ./gradlew installDist + res=$? popd + verifyResult $res "Java compilation failed" successln "Finished compiling Java code" # Copy META-INF to the distribution directory if it exists @@ -73,7 +75,9 @@ elif [ "$CC_SRC_LANGUAGE" = "typescript" ]; then pushd $CC_SRC_PATH npm install npm run build + res=$? popd + verifyResult $res "TypeScript compilation failed" successln "Finished compiling TypeScript code into JavaScript" else