Skip to content

Commit

Permalink
Included generated files open-telemetry#1787
Browse files Browse the repository at this point in the history
  • Loading branch information
Sozhan308 committed Jan 25, 2025
1 parent f8e6fc7 commit a7f76da
Show file tree
Hide file tree
Showing 3 changed files with 4,033 additions and 4 deletions.
9 changes: 8 additions & 1 deletion docker-gen-proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@ gen_proto_python() {
gen_proto_ts() {
echo "Generating Typescript protobuf files for $1"
docker build -f "src/$1/genproto/Dockerfile" -t "$1-genproto" .
docker run --rm -v $(pwd):/build "$1-genproto"
docker run --rm -e SERVICE=$1 -v $(pwd):/build "$1-genproto" /bin/sh -c '
mkdir -p /build/src/$SERVICE/protos && \
protoc -I /build/pb \
--plugin=protoc-gen-ts_proto=/app/node_modules/.bin/protoc-gen-ts_proto \
--ts_proto_opt=esModuleInterop=true \
--ts_proto_out="/build/src/$SERVICE/protos" \
--ts_proto_opt=outputServices=grpc-js \
/build/pb/demo.proto'
}

if [ -z "$1" ]; then
Expand Down
6 changes: 3 additions & 3 deletions src/frontend/genproto/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

FROM node:20-alpine

WORKDIR /build
WORKDIR /app

RUN apk add --no-cache libc6-compat protobuf-dev protoc

COPY ./src/frontend/package*.json ./
COPY ./pb ./pb

RUN npm ci

CMD ["npm", "run", "grpc:generate"]
COPY ./pb /build/pb
Loading

0 comments on commit a7f76da

Please sign in to comment.