-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add ts-protoc-gen plugin support
- Loading branch information
1 parent
f092d99
commit e42e045
Showing
5 changed files
with
20 additions
and
0 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
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
ARG ALPINE_VERSION | ||
ARG GO_VERSION | ||
ARG NODE_VERSION | ||
ARG RUST_VERSION | ||
ARG SWIFT_VERSION | ||
|
||
|
@@ -295,6 +296,17 @@ ARG TARGETPLATFORM | |
RUN xx-verify /out/usr/bin/protoc-gen-lint | ||
|
||
|
||
FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} as protoc_gen_ts | ||
ARG PROTOC_GEN_TS_VERSION | ||
RUN npm install -g pkg ts-protoc-gen@${PROTOC_GEN_TS_VERSION} | ||
RUN pkg \ | ||
--compress Brotli \ | ||
--targets node${NODE_VERSION}-alpine \ | ||
-o protoc-gen-ts \ | ||
/usr/local/lib/node_modules/ts-protoc-gen | ||
RUN install -D protoc-gen-ts /out/usr/bin/protoc-gen-ts | ||
|
||
|
||
FROM --platform=$BUILDPLATFORM alpine_host as upx | ||
RUN mkdir -p /upx | ||
ARG BUILDARCH BUILDOS UPX_VERSION | ||
|
@@ -331,6 +343,7 @@ RUN find /out -name "*.a" -delete -or -name "*.la" -delete | |
FROM alpine:${ALPINE_VERSION} | ||
LABEL maintainer="Roman Volosatovs <[email protected]>" | ||
COPY --from=upx /out/ / | ||
COPY --from=protoc_gen_ts /out/ / | ||
RUN apk add --no-cache \ | ||
bash\ | ||
grpc \ | ||
|
@@ -378,6 +391,7 @@ RUN protoc-wrapper \ | |
--python_out=/test \ | ||
--ruby_out=/test \ | ||
--rust_out=/test \ | ||
--ts_out=/test \ | ||
--validate_out=lang=go:/test \ | ||
google/protobuf/any.proto | ||
RUN protoc-wrapper \ | ||
|
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
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
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