Skip to content

Commit cfa81b1

Browse files
authored
Revert "Node with typings" (#19)
1 parent ef6070e commit cfa81b1

File tree

3 files changed

+11
-30
lines changed

3 files changed

+11
-30
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ RUN sudo mv /tmp/protoc-gen-grpc-web /usr/local/bin/ && sudo chmod u+x /usr/loca
2525
# deps for node.js
2626
RUN curl -fsSL https://deb.nodesource.com/setup_15.x | bash -
2727
RUN apt-get install -y nodejs
28-
RUN npm install -g protoc-gen-grpc
28+
RUN npm install -g grpc-tools
2929

3030
# compile build tool and put it into path
3131
ADD . /root/cs3apis-build

README.md

-20
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,2 @@
11
# cs3apis-build
22
Docker image to build the CS3APIS
3-
4-
## Development
5-
See the [cs3apis local compiliation instructions](https://github.com/cs3org/cs3apis#local-compilation) and the
6-
[cs3apis Makefile](https://github.com/cs3org/cs3apis/blob/main/Makefile)
7-
for pointers on how to run and test the code in this repo on your local machine.
8-
9-
So for instance:
10-
```sh
11-
git clone https://github.com/cs3org/cs3apis-build
12-
cd cs3apis-build
13-
// make your changes in how e.g. `cs3apis-build -build-js` works
14-
docker build -t cs3apis-build .
15-
cd ..
16-
git clone https://github.com/cs3org/cs3apis
17-
cd cs3apis
18-
docker run -v `pwd`:/root/cs3apis cs3apis-build cs3apis-build -build-js
19-
cd build/js-cs3apis
20-
git status
21-
// see the result
22-
```

build.go

+10-9
Original file line numberDiff line numberDiff line change
@@ -439,20 +439,21 @@ func buildNode() {
439439
checkout(protoBranch, "build/node-cs3apis")
440440
}
441441

442+
nodeProtocPlugin, err := exec.LookPath("grpc_tools_node_protoc_plugin")
443+
444+
if err != nil {
445+
panic(fmt.Sprintf("grpc_tools_node_protoc_plugin binary not found in PATH: %v\n", err))
446+
}
447+
442448
// remove leftovers (existing defs)
443449
os.RemoveAll("build/node-cs3apis/cs3")
444450

445451
files := findProtos()
446452

447-
args1 := []string{"--ts_out=grpc_js:./build/node-cs3apis"} //, "--proto_path ."}
448-
args1 = append(args1, files...)
449-
cmd1 := exec.Command("protoc-gen-grpc-ts", args1...)
450-
run(cmd1)
451-
452-
args2 := []string{"--js_out=import_style=commonjs,binary:./build/node-cs3apis", "--grpc_out=grpc_js:./build/node-cs3apis/"} //, "--proto_path ."}
453-
args2 = append(args2, files...)
454-
cmd2 := exec.Command("protoc-gen-grpc", args2...)
455-
run(cmd2)
453+
args := []string{"--js_out=import_style=commonjs,binary:./build/node-cs3apis", "--grpc_out=./build/node-cs3apis/", "--plugin=protoc-gen-grpc=" + nodeProtocPlugin}
454+
args = append(args, files...)
455+
cmd := exec.Command("grpc_tools_node_protoc", args...)
456+
run(cmd)
456457

457458
// get proto repo commit id
458459
hash := getCommitID(".")

0 commit comments

Comments
 (0)