From adabf5f271055436001410a9e35e39d74cb7ba65 Mon Sep 17 00:00:00 2001 From: 11Dimensions <103082479+11Dimensions@users.noreply.github.com> Date: Fri, 13 Jan 2023 15:45:49 -0500 Subject: [PATCH] add community/scalapb-scala plugin Fixes: #98 Co-authored-by: 11Dimensions <11Dimensions@users.noreply.github.com> Co-authored-by: Philip K. Warren --- plugins/community/scalapb-scala/source.yaml | 4 ++++ .../scalapb-scala/v0.11.12/.dockerignore | 2 ++ .../community/scalapb-scala/v0.11.12/Dockerfile | 15 +++++++++++++++ .../scalapb-scala/v0.11.12/buf.plugin.yaml | 9 +++++++++ .../scalapb-scala/v0.11.12/eliza/plugin.sum | 1 + .../scalapb-scala/v0.11.12/petapis/plugin.sum | 1 + 6 files changed, 32 insertions(+) create mode 100644 plugins/community/scalapb-scala/source.yaml create mode 100644 plugins/community/scalapb-scala/v0.11.12/.dockerignore create mode 100644 plugins/community/scalapb-scala/v0.11.12/Dockerfile create mode 100644 plugins/community/scalapb-scala/v0.11.12/buf.plugin.yaml create mode 100644 tests/testdata/buf.build/community/scalapb-scala/v0.11.12/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/community/scalapb-scala/v0.11.12/petapis/plugin.sum diff --git a/plugins/community/scalapb-scala/source.yaml b/plugins/community/scalapb-scala/source.yaml new file mode 100644 index 000000000..3ef5f58be --- /dev/null +++ b/plugins/community/scalapb-scala/source.yaml @@ -0,0 +1,4 @@ +source: + github: + owner: scalapb + repository: scalapb diff --git a/plugins/community/scalapb-scala/v0.11.12/.dockerignore b/plugins/community/scalapb-scala/v0.11.12/.dockerignore new file mode 100644 index 000000000..5d0f124ff --- /dev/null +++ b/plugins/community/scalapb-scala/v0.11.12/.dockerignore @@ -0,0 +1,2 @@ +* +!Dockerfile diff --git a/plugins/community/scalapb-scala/v0.11.12/Dockerfile b/plugins/community/scalapb-scala/v0.11.12/Dockerfile new file mode 100644 index 000000000..958856e52 --- /dev/null +++ b/plugins/community/scalapb-scala/v0.11.12/Dockerfile @@ -0,0 +1,15 @@ +# syntax=docker/dockerfile:1.4 +FROM debian:bullseye-20230109 AS build + +ARG TARGETARCH + +RUN apt-get update \ + && apt-get install -y curl + +#This script embeds the the .class files and is a self contained jvm protoc plugin. See https://scalapb.github.io/docs/scalapbc/#using-scalapb-as-a-proper-protoc-plugin for more details +RUN curl -fsSL -o protoc-gen-scala.jar https://repo1.maven.org/maven2/com/thesamet/scalapb/protoc-gen-scala/0.11.12/protoc-gen-scala-0.11.12-unix.sh + +FROM gcr.io/distroless/java11-debian11 +COPY --from=build --link /protoc-gen-scala.jar . +USER nobody +ENTRYPOINT [ "/usr/bin/java", "-jar", "/protoc-gen-scala.jar"] diff --git a/plugins/community/scalapb-scala/v0.11.12/buf.plugin.yaml b/plugins/community/scalapb-scala/v0.11.12/buf.plugin.yaml new file mode 100644 index 000000000..f01601b08 --- /dev/null +++ b/plugins/community/scalapb-scala/v0.11.12/buf.plugin.yaml @@ -0,0 +1,9 @@ +version: v1 +name: buf.build/community/scalapb-scala +plugin_version: v0.11.12 +source_url: https://github.com/scalapb/scalapb +description: Base types for Scala. Generates message and enum types. +output_languages: + - scala +spdx_license_id: Apache-2.0 +license_url: https://github.com/scalapb/ScalaPB/blob/v0.11.12/LICENSE diff --git a/tests/testdata/buf.build/community/scalapb-scala/v0.11.12/eliza/plugin.sum b/tests/testdata/buf.build/community/scalapb-scala/v0.11.12/eliza/plugin.sum new file mode 100644 index 000000000..5118786d2 --- /dev/null +++ b/tests/testdata/buf.build/community/scalapb-scala/v0.11.12/eliza/plugin.sum @@ -0,0 +1 @@ +h1:8ybHDT7xcm2OEoVkEDg3Yoc0JJySTC1aZ3ZHH6PK+Gw= diff --git a/tests/testdata/buf.build/community/scalapb-scala/v0.11.12/petapis/plugin.sum b/tests/testdata/buf.build/community/scalapb-scala/v0.11.12/petapis/plugin.sum new file mode 100644 index 000000000..4f33001ac --- /dev/null +++ b/tests/testdata/buf.build/community/scalapb-scala/v0.11.12/petapis/plugin.sum @@ -0,0 +1 @@ +h1:6yZvJ4tBl8nrZrSh8J67Rvc6ZZRobO6G22KjS26PUtc=