File tree 3 files changed +4033
-4
lines changed
3 files changed +4033
-4
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,14 @@ gen_proto_python() {
33
33
gen_proto_ts () {
34
34
echo " Generating Typescript protobuf files for $1 "
35
35
docker build -f " src/$1 /genproto/Dockerfile" -t " $1 -genproto" .
36
- docker run --rm -v $( pwd) :/build " $1 -genproto"
36
+ docker run --rm -e SERVICE=$1 -v $( pwd) :/build " $1 -genproto" /bin/sh -c '
37
+ mkdir -p /build/src/$SERVICE/protos && \
38
+ protoc -I /build/pb \
39
+ --plugin=protoc-gen-ts_proto=/app/node_modules/.bin/protoc-gen-ts_proto \
40
+ --ts_proto_opt=esModuleInterop=true \
41
+ --ts_proto_out="/build/src/$SERVICE/protos" \
42
+ --ts_proto_opt=outputServices=grpc-js \
43
+ /build/pb/demo.proto'
37
44
}
38
45
39
46
if [ -z " $1 " ]; then
Original file line number Diff line number Diff line change 3
3
4
4
FROM node:20-alpine
5
5
6
- WORKDIR /build
6
+ WORKDIR /app
7
7
8
8
RUN apk add --no-cache libc6-compat protobuf-dev protoc
9
9
10
10
COPY ./src/frontend/package*.json ./
11
- COPY ./pb ./pb
11
+
12
12
RUN npm ci
13
13
14
- CMD [ "npm" , "run" , "grpc:generate" ]
14
+ COPY ./pb /build/pb
You can’t perform that action at this time.
0 commit comments