Skip to content

Commit cfca498

Browse files
authored
Add gotemplate plugin (#82)
1 parent 44d6d6e commit cfca498

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ ARG GO_VERSION
44
ARG RUST_VERSION
55
ARG SWIFT_VERSION
66
ARG NODE_VERSION
7+
ARG GOTEMPLATE_VERSION
78

89
FROM alpine:${ALPINE_VERSION} as protoc_builder
910
RUN apk add --no-cache build-base curl automake autoconf libtool git zlib-dev linux-headers cmake ninja
@@ -205,6 +206,7 @@ RUN mkdir -p /dart-protobuf && \
205206
cd /dart-protobuf/protoc_plugin && pub install && dart2native --verbose bin/protoc_plugin.dart -o protoc_plugin && \
206207
install -D /dart-protobuf/protoc_plugin/protoc_plugin /out/usr/bin/protoc-gen-dart
207208

209+
FROM moul/protoc-gen-gotemplate:v${GOTEMPLATE_VERSION} as protoc_gotemplate
208210

209211
FROM alpine:${ALPINE_VERSION} as packer
210212
RUN apk add --no-cache curl
@@ -218,6 +220,7 @@ COPY --from=go_builder /out/ /out/
218220
COPY --from=rust_builder /out/ /out/
219221
COPY --from=swift_builder /protoc-gen-swift /out/protoc-gen-swift
220222
COPY --from=dart_builder /out/ /out/
223+
COPY --from=protoc_gotemplate /go/bin/protoc-gen-gotemplate /out/usr/bin/
221224
RUN upx --lzma $(find /out/usr/bin/ \
222225
-type f -name 'grpc_*' \
223226
-not -name 'grpc_csharp_plugin' \

build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ docker build \
2727
--build-arg TS_PROTOC_GEN_VERSION="${TS_PROTOC_GEN_VERSION:-"0.14.0"}" \
2828
--build-arg UPX_VERSION="${UPX_VERSION:-"3.96"}" \
2929
--build-arg JSONSCHEMA_VERSION="${JSONSCHEMA_VERSION:-"1.3.1"}" \
30+
--build-arg GOTEMPLATE_VERSION="${GOTEMPLATE_VERSION:-"1.11.2"}" \
3031
${@} .

0 commit comments

Comments
 (0)