Skip to content

Commit 00a8535

Browse files
committed
Try to fix CI again.
1 parent 6c488f4 commit 00a8535

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

packages/sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"test-rn": "yarn test -c jest.config.react-native.ts",
9797
"test-web": "yarn test -c jest.config.web.ts",
9898
"test-ci": "yarn test ./test/ci && yarn test-rn ./test/ci && yarn test-web ./test/ci",
99-
"build": "yarn clean && mkdirp src/grpc-api && yarn generate && yarn build-dev",
99+
"build": "yarn clean && yarn mkdirp src/grpc-api && yarn generate && yarn build-dev",
100100
"build-dev": "tsc -p tsconfig.build.json && yarn webpack",
101101
"webpack": "tsx ../../node_modules/webpack-cli/bin/cli.js --config webpack.config.ts",
102102
"clean": "rimraf -- lib src/grpc-api",

packages/sdk/scripts/run-protoc.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { spawnSync } from "child_process";
22
import path from "path";
3+
import fs from "fs";
34

45
const isWindows = process.platform === "win32";
56

@@ -11,13 +12,17 @@ const protocGenTs = isWindows ?
1112
path.resolve("../../node_modules/@protobuf-ts/plugin/bin", "protoc-gen-ts");
1213

1314
const grpcApiDir = path.resolve("../../deps/concordium-base/concordium-grpc-api");
15+
const protoDir = path.join(grpcApiDir, "v2", "concordium");
16+
const protoFiles = fs.readdirSync(protoDir)
17+
.filter((file) => file.endsWith(".proto"))
18+
.map((file) => path.join(protoDir, file));
1419

1520
const args = [
1621
`--plugin=protoc-gen-ts=${protocGenTs}`,
1722
"--ts_opt", "optimize_code_size",
1823
"--ts_out=src/grpc-api",
1924
"-I", grpcApiDir,
20-
`${grpcApiDir}/v2/concordium/*.proto`,
25+
...protoFiles,
2126
];
2227

2328
const result = spawnSync(protoc, args, { stdio: 'inherit', shell: isWindows });

0 commit comments

Comments
 (0)