-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(weaver): add build script and fix minor issues
- Add a bash script in tools to build all the weaver packages in single command. - Export `getMSPConfigurations` from fabric interop sdk (is imported in fabric cli, was causing compilation error on node 20) - Move bash shebang to the top of `check-nodes-status`. On ubuntu 20 having this below was causing the file to be interpreted as sh (resulting in error) - Update `package-local.json` files to be more inline with `package.json`. Signed-off-by: Michal Bajer <[email protected]>
- Loading branch information
Showing
9 changed files
with
289 additions
and
168 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
#!/usr/bin/env bash | ||
|
||
THIS_SCRIPT_DIR="$(dirname "$0")" | ||
WEAVER_DIR="$THIS_SCRIPT_DIR/../weaver" | ||
|
||
echo -e "\n######################################" | ||
echo "Remove weaver node_modules..." | ||
echo -e "######################################\n" | ||
|
||
echo "Cacti configure process interferes with weaver packages, clean it for fresh start" | ||
find "$WEAVER_DIR" -name node_modules -exec rm -rf {} \; | ||
|
||
echo -e "\n######################################" | ||
echo "Environment check" | ||
echo -e "######################################\n" | ||
|
||
set -e # Fail on error from now on | ||
|
||
echo "Weaver path: $WEAVER_DIR" | ||
go version | ||
rustc --version | ||
java -version | ||
protoc --version | ||
protoc-gen-go --version | ||
protoc-gen-go-grpc --version | ||
|
||
echo -e "\n######################################" | ||
echo "Build protos..." | ||
echo -e "######################################\n" | ||
|
||
echo "# JS" | ||
pushd "${WEAVER_DIR}/common/protos-js"; make build; popd | ||
echo "# Go" | ||
pushd "${WEAVER_DIR}/common/protos-go"; make build; popd | ||
echo "# Java" | ||
pushd "${WEAVER_DIR}/common/protos-java-kt"; make build; popd | ||
echo "# Solidity" | ||
pushd "${WEAVER_DIR}/common/protos-sol"; make build; popd | ||
echo "# Rust" | ||
pushd "${WEAVER_DIR}/common/protos-rs"; make build; popd | ||
|
||
echo -e "\n######################################" | ||
echo "Build relay..." | ||
echo -e "######################################\n" | ||
|
||
pushd "${WEAVER_DIR}/core/relay" | ||
make protos-local | ||
make update-pkgs | ||
make | ||
popd | ||
|
||
echo -e "\n######################################" | ||
echo "Build fabric components..." | ||
echo -e "######################################\n" | ||
|
||
echo "# Node SDK" | ||
pushd "${WEAVER_DIR}/sdks/fabric/interoperation-node-sdk"; make build-local; popd | ||
echo "# Node CLI" | ||
pushd "${WEAVER_DIR}/samples/fabric/fabric-cli"; make build-local; popd | ||
echo "# Go SDK" | ||
pushd "${WEAVER_DIR}/sdks/fabric/go-sdk"; make build-local; popd | ||
echo "# Go CLI" | ||
# TODO - uncomment once the build is fixed | ||
# pushd "${WEAVER_DIR}/samples/fabric/go-cli"; make build-local; popd | ||
echo "# Driver" | ||
pushd "${WEAVER_DIR}/core/drivers/fabric-driver"; make build-local; popd | ||
echo "# IIN Agent" | ||
pushd "${WEAVER_DIR}/core/identity-management/iin-agent"; make build-local; popd | ||
|
||
echo -e "\n######################################" | ||
echo "Build corda components..." | ||
echo -e "######################################\n" | ||
|
||
echo "# Interop App" | ||
pushd "${WEAVER_DIR}/core/network/corda-interop-app"; make build-local; popd | ||
echo "# SDK" | ||
pushd "${WEAVER_DIR}/sdks/corda"; make build; popd | ||
echo "# Simple Application" | ||
pushd "${WEAVER_DIR}/samples/corda/corda-simple-application"; make build-local; popd | ||
echo "# Driver" | ||
pushd "${WEAVER_DIR}/core/drivers/corda-driver"; make build-local; popd | ||
|
||
echo -e "\n######################################" | ||
echo "Build besu components..." | ||
echo -e "######################################\n" | ||
|
||
echo "# SDK" | ||
pushd "${WEAVER_DIR}/sdks/besu/node"; make build-local; popd | ||
echo "# CLI" | ||
pushd "${WEAVER_DIR}/samples/besu/besu-cli"; make build-local; popd | ||
|
||
echo "Done!" | ||
exit 0; |
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
106 changes: 57 additions & 49 deletions
106
weaver/core/identity-management/iin-agent/package-local.json
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 |
---|---|---|
@@ -1,51 +1,59 @@ | ||
{ | ||
"name": "@hyperledger/cacti-weaver-iin-agent", | ||
"version": "2.0.0-alpha.2", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "nyc mocha -r ts-node/register --exclude 'test/data/**/*.js' --recursive -t 10000", | ||
"build": "npm run tsc", | ||
"tsc": "tsc", | ||
"start": "node out/server.js", | ||
"watch": "tsc --watch", | ||
"dev": "nodemon out/server.js", | ||
"lint": "eslint '*/**/*.{js,ts,tsx}' --quiet --fix" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/hyperledger/cacti.git" | ||
}, | ||
"author": "", | ||
"license": "Apache-2.0", | ||
"dependencies": { | ||
"@fidm/x509": "1.2.1", | ||
"@grpc/grpc-js": "1.9.5", | ||
"@hyperledger/cacti-weaver-protos-js": "file:./protos-js", | ||
"@hyperledger/cacti-weaver-sdk-fabric": "file:./cacti-weaver-sdk-fabric", | ||
"@typescript-eslint/eslint-plugin": "3.10.1", | ||
"@typescript-eslint/parser": "3.10.1", | ||
"dotenv": "8.6.0", | ||
"eslint-config-prettier": "6.15.0", | ||
"eslint-plugin-prettier": "3.4.1", | ||
"fabric-ca-client": "2.2.19", | ||
"fabric-common": "2.2.19", | ||
"fabric-network": "2.2.19" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "16.18.41", | ||
"chai": "4.3.7", | ||
"chai-as-promised": "7.1.1", | ||
"mocha": "5.2.0", | ||
"nodemon": "2.0.22", | ||
"nyc": "12.0.2", | ||
"patch-package": "6.5.1", | ||
"proto3-json-serializer": "1.1.1", | ||
"rewire": "4.0.1", | ||
"sinon": "6.3.5", | ||
"sinon-chai": "3.7.0", | ||
"ts-node": "10.9.1", | ||
"typedoc": "0.24.8", | ||
"typescript": "4.9.5" | ||
} | ||
"name": "@hyperledger/cacti-weaver-iin-agent", | ||
"version": "2.0.0-alpha.2", | ||
"description": "", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/hyperledger/cacti.git" | ||
}, | ||
"license": "Apache-2.0", | ||
"author": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"build": "npm run tsc", | ||
"dev": "nodemon out/server.js", | ||
"lint": "eslint '*/**/*.{js,ts,tsx}' --quiet --fix", | ||
"start": "node out/server.js", | ||
"test": "nyc mocha -r ts-node/register --exclude 'test/data/**/*.js' --recursive -t 10000", | ||
"tsc": "tsc", | ||
"watch": "tsc --watch" | ||
}, | ||
"dependencies": { | ||
"@fidm/x509": "1.2.1", | ||
"@grpc/grpc-js": "1.9.5", | ||
"@hyperledger/cacti-weaver-protos-js": "file:./protos-js", | ||
"@hyperledger/cacti-weaver-sdk-fabric": "file:./cacti-weaver-sdk-fabric", | ||
"@typescript-eslint/eslint-plugin": "3.10.1", | ||
"@typescript-eslint/parser": "3.10.1", | ||
"dotenv": "8.6.0", | ||
"eslint-config-prettier": "6.15.0", | ||
"eslint-plugin-prettier": "3.4.1", | ||
"fabric-ca-client": "2.2.19", | ||
"fabric-common": "2.2.19", | ||
"fabric-network": "2.2.19", | ||
"uuid": "9.0.1" | ||
}, | ||
"devDependencies": { | ||
"@types/jsrsasign": "10.5.11", | ||
"@types/node": "16.18.41", | ||
"@types/uuid": "9.0.6", | ||
"chai": "4.3.7", | ||
"chai-as-promised": "7.1.1", | ||
"jsrsasign": "10.8.6", | ||
"mocha": "5.2.0", | ||
"nodemon": "2.0.22", | ||
"nyc": "12.0.2", | ||
"patch-package": "6.5.1", | ||
"proto3-json-serializer": "1.1.1", | ||
"rewire": "4.0.1", | ||
"sinon": "6.3.5", | ||
"sinon-chai": "3.7.0", | ||
"ts-node": "10.9.1", | ||
"typedoc": "0.24.8", | ||
"typescript": "4.9.5" | ||
}, | ||
"engines": { | ||
"node": ">=18", | ||
"npm": ">=8" | ||
} | ||
} |
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.