From 24cc0ccd7789483b1f8c67e70070a7bba3484211 Mon Sep 17 00:00:00 2001 From: "Philip K. Warren" Date: Thu, 14 Mar 2024 10:11:48 -0500 Subject: [PATCH] Add protoc v26.0 and protobuf-ts v2.9.4 --- .github/docker/Dockerfile.bazel | 2 +- .../v2.9.4/.dockerignore | 3 + .../timostamm-protobuf-ts/v2.9.4/Dockerfile | 11 +++ .../v2.9.4/buf.plugin.yaml | 21 ++++++ .../v2.9.4/package-lock.json | 73 +++++++++++++++++++ .../timostamm-protobuf-ts/v2.9.4/package.json | 7 ++ .../protocolbuffers/cpp/v26.0/.dockerignore | 4 + plugins/protocolbuffers/cpp/v26.0/BUILD | 7 ++ plugins/protocolbuffers/cpp/v26.0/Dockerfile | 24 ++++++ .../protocolbuffers/cpp/v26.0/buf.plugin.yaml | 9 +++ plugins/protocolbuffers/cpp/v26.0/cpp.cc | 7 ++ .../csharp/v26.0/.dockerignore | 4 + plugins/protocolbuffers/csharp/v26.0/BUILD | 7 ++ .../protocolbuffers/csharp/v26.0/Dockerfile | 24 ++++++ .../csharp/v26.0/buf.plugin.yaml | 9 +++ .../protocolbuffers/csharp/v26.0/csharp.cc | 7 ++ .../protocolbuffers/java/v26.0/.dockerignore | 4 + plugins/protocolbuffers/java/v26.0/BUILD | 7 ++ plugins/protocolbuffers/java/v26.0/Dockerfile | 24 ++++++ .../java/v26.0/buf.plugin.yaml | 19 +++++ plugins/protocolbuffers/java/v26.0/java.cc | 7 ++ .../kotlin/v26.0/.dockerignore | 4 + plugins/protocolbuffers/kotlin/v26.0/BUILD | 7 ++ .../protocolbuffers/kotlin/v26.0/Dockerfile | 24 ++++++ .../kotlin/v26.0/buf.plugin.yaml | 27 +++++++ .../protocolbuffers/kotlin/v26.0/kotlin.cc | 7 ++ .../protocolbuffers/objc/v26.0/.dockerignore | 4 + plugins/protocolbuffers/objc/v26.0/BUILD | 7 ++ plugins/protocolbuffers/objc/v26.0/Dockerfile | 24 ++++++ .../objc/v26.0/buf.plugin.yaml | 9 +++ .../protocolbuffers/objc/v26.0/objectivec.cc | 7 ++ .../protocolbuffers/php/v26.0/.dockerignore | 4 + plugins/protocolbuffers/php/v26.0/BUILD | 7 ++ plugins/protocolbuffers/php/v26.0/Dockerfile | 24 ++++++ .../protocolbuffers/php/v26.0/buf.plugin.yaml | 9 +++ plugins/protocolbuffers/php/v26.0/php.cc | 7 ++ .../protocolbuffers/pyi/v26.0/.dockerignore | 4 + plugins/protocolbuffers/pyi/v26.0/BUILD | 8 ++ plugins/protocolbuffers/pyi/v26.0/Dockerfile | 24 ++++++ .../protocolbuffers/pyi/v26.0/buf.plugin.yaml | 18 +++++ plugins/protocolbuffers/pyi/v26.0/pyi.cc | 8 ++ .../python/v26.0/.dockerignore | 4 + plugins/protocolbuffers/python/v26.0/BUILD | 7 ++ .../protocolbuffers/python/v26.0/Dockerfile | 24 ++++++ .../python/v26.0/buf.plugin.yaml | 17 +++++ .../protocolbuffers/python/v26.0/python.cc | 7 ++ .../protocolbuffers/ruby/v26.0/.dockerignore | 4 + plugins/protocolbuffers/ruby/v26.0/BUILD | 7 ++ plugins/protocolbuffers/ruby/v26.0/Dockerfile | 24 ++++++ .../ruby/v26.0/buf.plugin.yaml | 9 +++ plugins/protocolbuffers/ruby/v26.0/ruby.cc | 7 ++ .../v2.9.4/eliza/plugin.sum | 1 + .../v2.9.4/petapis/plugin.sum | 1 + .../cpp/v26.0/eliza/plugin.sum | 1 + .../cpp/v26.0/petapis/plugin.sum | 1 + .../csharp/v26.0/eliza/plugin.sum | 1 + .../csharp/v26.0/petapis/plugin.sum | 1 + .../java/v26.0/eliza/plugin.sum | 1 + .../java/v26.0/petapis/plugin.sum | 1 + .../kotlin/v26.0/eliza/plugin.sum | 1 + .../kotlin/v26.0/petapis/plugin.sum | 1 + .../objc/v26.0/eliza/plugin.sum | 1 + .../objc/v26.0/petapis/plugin.sum | 1 + .../php/v26.0/eliza/plugin.sum | 1 + .../php/v26.0/petapis/plugin.sum | 1 + .../pyi/v26.0/eliza/plugin.sum | 1 + .../pyi/v26.0/petapis/plugin.sum | 1 + .../python/v26.0/eliza/plugin.sum | 1 + .../python/v26.0/petapis/plugin.sum | 1 + .../ruby/v26.0/eliza/plugin.sum | 1 + .../ruby/v26.0/petapis/plugin.sum | 1 + 71 files changed, 642 insertions(+), 1 deletion(-) create mode 100644 plugins/community/timostamm-protobuf-ts/v2.9.4/.dockerignore create mode 100644 plugins/community/timostamm-protobuf-ts/v2.9.4/Dockerfile create mode 100644 plugins/community/timostamm-protobuf-ts/v2.9.4/buf.plugin.yaml create mode 100644 plugins/community/timostamm-protobuf-ts/v2.9.4/package-lock.json create mode 100644 plugins/community/timostamm-protobuf-ts/v2.9.4/package.json create mode 100644 plugins/protocolbuffers/cpp/v26.0/.dockerignore create mode 100644 plugins/protocolbuffers/cpp/v26.0/BUILD create mode 100644 plugins/protocolbuffers/cpp/v26.0/Dockerfile create mode 100644 plugins/protocolbuffers/cpp/v26.0/buf.plugin.yaml create mode 100644 plugins/protocolbuffers/cpp/v26.0/cpp.cc create mode 100644 plugins/protocolbuffers/csharp/v26.0/.dockerignore create mode 100644 plugins/protocolbuffers/csharp/v26.0/BUILD create mode 100644 plugins/protocolbuffers/csharp/v26.0/Dockerfile create mode 100644 plugins/protocolbuffers/csharp/v26.0/buf.plugin.yaml create mode 100644 plugins/protocolbuffers/csharp/v26.0/csharp.cc create mode 100644 plugins/protocolbuffers/java/v26.0/.dockerignore create mode 100644 plugins/protocolbuffers/java/v26.0/BUILD create mode 100644 plugins/protocolbuffers/java/v26.0/Dockerfile create mode 100644 plugins/protocolbuffers/java/v26.0/buf.plugin.yaml create mode 100644 plugins/protocolbuffers/java/v26.0/java.cc create mode 100644 plugins/protocolbuffers/kotlin/v26.0/.dockerignore create mode 100644 plugins/protocolbuffers/kotlin/v26.0/BUILD create mode 100644 plugins/protocolbuffers/kotlin/v26.0/Dockerfile create mode 100644 plugins/protocolbuffers/kotlin/v26.0/buf.plugin.yaml create mode 100644 plugins/protocolbuffers/kotlin/v26.0/kotlin.cc create mode 100644 plugins/protocolbuffers/objc/v26.0/.dockerignore create mode 100644 plugins/protocolbuffers/objc/v26.0/BUILD create mode 100644 plugins/protocolbuffers/objc/v26.0/Dockerfile create mode 100644 plugins/protocolbuffers/objc/v26.0/buf.plugin.yaml create mode 100644 plugins/protocolbuffers/objc/v26.0/objectivec.cc create mode 100644 plugins/protocolbuffers/php/v26.0/.dockerignore create mode 100644 plugins/protocolbuffers/php/v26.0/BUILD create mode 100644 plugins/protocolbuffers/php/v26.0/Dockerfile create mode 100644 plugins/protocolbuffers/php/v26.0/buf.plugin.yaml create mode 100644 plugins/protocolbuffers/php/v26.0/php.cc create mode 100644 plugins/protocolbuffers/pyi/v26.0/.dockerignore create mode 100644 plugins/protocolbuffers/pyi/v26.0/BUILD create mode 100644 plugins/protocolbuffers/pyi/v26.0/Dockerfile create mode 100644 plugins/protocolbuffers/pyi/v26.0/buf.plugin.yaml create mode 100644 plugins/protocolbuffers/pyi/v26.0/pyi.cc create mode 100644 plugins/protocolbuffers/python/v26.0/.dockerignore create mode 100644 plugins/protocolbuffers/python/v26.0/BUILD create mode 100644 plugins/protocolbuffers/python/v26.0/Dockerfile create mode 100644 plugins/protocolbuffers/python/v26.0/buf.plugin.yaml create mode 100644 plugins/protocolbuffers/python/v26.0/python.cc create mode 100644 plugins/protocolbuffers/ruby/v26.0/.dockerignore create mode 100644 plugins/protocolbuffers/ruby/v26.0/BUILD create mode 100644 plugins/protocolbuffers/ruby/v26.0/Dockerfile create mode 100644 plugins/protocolbuffers/ruby/v26.0/buf.plugin.yaml create mode 100644 plugins/protocolbuffers/ruby/v26.0/ruby.cc create mode 100644 tests/testdata/buf.build/community/timostamm-protobuf-ts/v2.9.4/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/community/timostamm-protobuf-ts/v2.9.4/petapis/plugin.sum create mode 100644 tests/testdata/buf.build/protocolbuffers/cpp/v26.0/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/protocolbuffers/cpp/v26.0/petapis/plugin.sum create mode 100644 tests/testdata/buf.build/protocolbuffers/csharp/v26.0/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/protocolbuffers/csharp/v26.0/petapis/plugin.sum create mode 100644 tests/testdata/buf.build/protocolbuffers/java/v26.0/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/protocolbuffers/java/v26.0/petapis/plugin.sum create mode 100644 tests/testdata/buf.build/protocolbuffers/kotlin/v26.0/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/protocolbuffers/kotlin/v26.0/petapis/plugin.sum create mode 100644 tests/testdata/buf.build/protocolbuffers/objc/v26.0/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/protocolbuffers/objc/v26.0/petapis/plugin.sum create mode 100644 tests/testdata/buf.build/protocolbuffers/php/v26.0/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/protocolbuffers/php/v26.0/petapis/plugin.sum create mode 100644 tests/testdata/buf.build/protocolbuffers/pyi/v26.0/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/protocolbuffers/pyi/v26.0/petapis/plugin.sum create mode 100644 tests/testdata/buf.build/protocolbuffers/python/v26.0/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/protocolbuffers/python/v26.0/petapis/plugin.sum create mode 100644 tests/testdata/buf.build/protocolbuffers/ruby/v26.0/eliza/plugin.sum create mode 100644 tests/testdata/buf.build/protocolbuffers/ruby/v26.0/petapis/plugin.sum diff --git a/.github/docker/Dockerfile.bazel b/.github/docker/Dockerfile.bazel index 338132998..6a06649b9 100644 --- a/.github/docker/Dockerfile.bazel +++ b/.github/docker/Dockerfile.bazel @@ -1,3 +1,3 @@ -FROM gcr.io/bazel-public/bazel:7.1.0 +FROM gcr.io/bazel-public/bazel:7.0.2 CMD echo this is a dummy file used to automate dependency upgrades for plugins diff --git a/plugins/community/timostamm-protobuf-ts/v2.9.4/.dockerignore b/plugins/community/timostamm-protobuf-ts/v2.9.4/.dockerignore new file mode 100644 index 000000000..771bbbaa9 --- /dev/null +++ b/plugins/community/timostamm-protobuf-ts/v2.9.4/.dockerignore @@ -0,0 +1,3 @@ +* +!Dockerfile +!package*.json diff --git a/plugins/community/timostamm-protobuf-ts/v2.9.4/Dockerfile b/plugins/community/timostamm-protobuf-ts/v2.9.4/Dockerfile new file mode 100644 index 000000000..ca1e3a43e --- /dev/null +++ b/plugins/community/timostamm-protobuf-ts/v2.9.4/Dockerfile @@ -0,0 +1,11 @@ +# syntax=docker/dockerfile:1.4 +FROM node:20.11.1-alpine3.19 AS build +WORKDIR /app +COPY --link package*.json . +RUN npm ci +RUN sed -i -e 's|/usr/bin/env node|/nodejs/bin/node|g' /app/node_modules/@protobuf-ts/plugin/bin/protoc-gen-ts + +FROM gcr.io/distroless/nodejs20-debian12:latest@sha256:e0edb89411e3f93863e9bd97c15cddcbac968d7a16b7a82af6ae6b264da65de9 +COPY --link --from=build /app /app +USER nobody +ENTRYPOINT [ "/app/node_modules/.bin/protoc-gen-ts" ] diff --git a/plugins/community/timostamm-protobuf-ts/v2.9.4/buf.plugin.yaml b/plugins/community/timostamm-protobuf-ts/v2.9.4/buf.plugin.yaml new file mode 100644 index 000000000..f634b67ef --- /dev/null +++ b/plugins/community/timostamm-protobuf-ts/v2.9.4/buf.plugin.yaml @@ -0,0 +1,21 @@ +version: v1 +name: buf.build/community/timostamm-protobuf-ts +plugin_version: v2.9.4 +source_url: https://github.com/timostamm/protobuf-ts +integration_guide_url: https://github.com/timostamm/protobuf-ts#quickstart +description: Generates Protobuf and RPC for TypeScript. +output_languages: + - javascript + - typescript +registry: + npm: + import_style: module + deps: + - package: '@protobuf-ts/runtime' + version: ^2.9.4 + - package: '@protobuf-ts/runtime-rpc' + version: ^2.9.4 + opts: + - output_javascript,optimize_code_size,long_type_string,add_pb_suffix,ts_nocheck,eslint_disable +spdx_license_id: Apache-2.0 +license_url: https://github.com/timostamm/protobuf-ts/blob/v2.9.4/LICENSE diff --git a/plugins/community/timostamm-protobuf-ts/v2.9.4/package-lock.json b/plugins/community/timostamm-protobuf-ts/v2.9.4/package-lock.json new file mode 100644 index 000000000..ef89a7aa5 --- /dev/null +++ b/plugins/community/timostamm-protobuf-ts/v2.9.4/package-lock.json @@ -0,0 +1,73 @@ +{ + "name": "plugins-timostamm-protobuf-ts", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "plugins-timostamm-protobuf-ts", + "version": "1.0.0", + "dependencies": { + "@protobuf-ts/plugin": "2.9.4" + } + }, + "node_modules/@protobuf-ts/plugin": { + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/@protobuf-ts/plugin/-/plugin-2.9.4.tgz", + "integrity": "sha512-Db5Laq5T3mc6ERZvhIhkj1rn57/p8gbWiCKxQWbZBBl20wMuqKoHbRw4tuD7FyXi+IkwTToaNVXymv5CY3E8Rw==", + "dependencies": { + "@protobuf-ts/plugin-framework": "^2.9.4", + "@protobuf-ts/protoc": "^2.9.4", + "@protobuf-ts/runtime": "^2.9.4", + "@protobuf-ts/runtime-rpc": "^2.9.4", + "typescript": "^3.9" + }, + "bin": { + "protoc-gen-dump": "bin/protoc-gen-dump", + "protoc-gen-ts": "bin/protoc-gen-ts" + } + }, + "node_modules/@protobuf-ts/plugin-framework": { + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/@protobuf-ts/plugin-framework/-/plugin-framework-2.9.4.tgz", + "integrity": "sha512-9nuX1kjdMliv+Pes8dQCKyVhjKgNNfwxVHg+tx3fLXSfZZRcUHMc1PMwB9/vTvc6gBKt9QGz5ERqSqZc0++E9A==", + "dependencies": { + "@protobuf-ts/runtime": "^2.9.4", + "typescript": "^3.9" + } + }, + "node_modules/@protobuf-ts/protoc": { + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/@protobuf-ts/protoc/-/protoc-2.9.4.tgz", + "integrity": "sha512-hQX+nOhFtrA+YdAXsXEDrLoGJqXHpgv4+BueYF0S9hy/Jq0VRTVlJS1Etmf4qlMt/WdigEes5LOd/LDzui4GIQ==", + "bin": { + "protoc": "protoc.js" + } + }, + "node_modules/@protobuf-ts/runtime": { + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime/-/runtime-2.9.4.tgz", + "integrity": "sha512-vHRFWtJJB/SiogWDF0ypoKfRIZ41Kq+G9cEFj6Qm1eQaAhJ1LDFvgZ7Ja4tb3iLOQhz0PaoPnnOijF1qmEqTxg==" + }, + "node_modules/@protobuf-ts/runtime-rpc": { + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime-rpc/-/runtime-rpc-2.9.4.tgz", + "integrity": "sha512-y9L9JgnZxXFqH5vD4d7j9duWvIJ7AShyBRoNKJGhu9Q27qIbchfzli66H9RvrQNIFk5ER7z1Twe059WZGqERcA==", + "dependencies": { + "@protobuf-ts/runtime": "^2.9.4" + } + }, + "node_modules/typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + } + } +} diff --git a/plugins/community/timostamm-protobuf-ts/v2.9.4/package.json b/plugins/community/timostamm-protobuf-ts/v2.9.4/package.json new file mode 100644 index 000000000..bcfbcae05 --- /dev/null +++ b/plugins/community/timostamm-protobuf-ts/v2.9.4/package.json @@ -0,0 +1,7 @@ +{ + "name": "plugins-timostamm-protobuf-ts", + "version": "1.0.0", + "dependencies": { + "@protobuf-ts/plugin": "2.9.4" + } +} diff --git a/plugins/protocolbuffers/cpp/v26.0/.dockerignore b/plugins/protocolbuffers/cpp/v26.0/.dockerignore new file mode 100644 index 000000000..c80455688 --- /dev/null +++ b/plugins/protocolbuffers/cpp/v26.0/.dockerignore @@ -0,0 +1,4 @@ +* +!BUILD +!cpp.cc +!Dockerfile diff --git a/plugins/protocolbuffers/cpp/v26.0/BUILD b/plugins/protocolbuffers/cpp/v26.0/BUILD new file mode 100644 index 000000000..3cacc9e33 --- /dev/null +++ b/plugins/protocolbuffers/cpp/v26.0/BUILD @@ -0,0 +1,7 @@ +cc_binary( + name = "protoc-gen-cpp", + srcs = ["cpp.cc"], + deps = [ + "//:protoc_lib", + ], +) diff --git a/plugins/protocolbuffers/cpp/v26.0/Dockerfile b/plugins/protocolbuffers/cpp/v26.0/Dockerfile new file mode 100644 index 000000000..c17fd80f5 --- /dev/null +++ b/plugins/protocolbuffers/cpp/v26.0/Dockerfile @@ -0,0 +1,24 @@ +# syntax=docker/dockerfile:1.5 +FROM debian:bookworm-20240311 AS build + +ARG TARGETARCH + +RUN apt-get update \ + && apt-get install -y curl git cmake build-essential g++ unzip zip +RUN arch=${TARGETARCH}; \ + if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \ + curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/7.0.2/bazel-7.0.2-linux-${arch} \ + && chmod +x /usr/local/bin/bazel + +WORKDIR /build +RUN curl -fsSL -o protoc.tar.gz https://github.com/protocolbuffers/protobuf/releases/download/v26.0/protobuf-26.0.tar.gz \ + && tar --strip-components=1 -zxf protoc.tar.gz \ + && rm protoc.tar.gz +RUN bazel build '//:protoc_lib' +COPY --link BUILD cpp.cc plugins/ +RUN bazel build '//plugins:protoc-gen-cpp.stripped' + +FROM gcr.io/distroless/cc-debian12:latest@sha256:e6ae66a5a343d7112167f9117c4e630cfffcd80db44e44302759ec13ddd2d22b +COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-cpp . +USER nobody +ENTRYPOINT ["/protoc-gen-cpp"] diff --git a/plugins/protocolbuffers/cpp/v26.0/buf.plugin.yaml b/plugins/protocolbuffers/cpp/v26.0/buf.plugin.yaml new file mode 100644 index 000000000..b6a1cc1c2 --- /dev/null +++ b/plugins/protocolbuffers/cpp/v26.0/buf.plugin.yaml @@ -0,0 +1,9 @@ +version: v1 +name: buf.build/protocolbuffers/cpp +plugin_version: v26.0 +source_url: https://github.com/protocolbuffers/protobuf +description: Base types for C++. Generates message and enum types. +output_languages: + - cpp +spdx_license_id: BSD-3-Clause +license_url: https://github.com/protocolbuffers/protobuf/blob/v26.0/LICENSE diff --git a/plugins/protocolbuffers/cpp/v26.0/cpp.cc b/plugins/protocolbuffers/cpp/v26.0/cpp.cc new file mode 100644 index 000000000..a3c5da56f --- /dev/null +++ b/plugins/protocolbuffers/cpp/v26.0/cpp.cc @@ -0,0 +1,7 @@ +#include +#include + +int main(int argc, char *argv[]) { + google::protobuf::compiler::cpp::CppGenerator generator; + return google::protobuf::compiler::PluginMain(argc, argv, &generator); +} diff --git a/plugins/protocolbuffers/csharp/v26.0/.dockerignore b/plugins/protocolbuffers/csharp/v26.0/.dockerignore new file mode 100644 index 000000000..abbf4b500 --- /dev/null +++ b/plugins/protocolbuffers/csharp/v26.0/.dockerignore @@ -0,0 +1,4 @@ +* +!BUILD +!csharp.cc +!Dockerfile diff --git a/plugins/protocolbuffers/csharp/v26.0/BUILD b/plugins/protocolbuffers/csharp/v26.0/BUILD new file mode 100644 index 000000000..c68d051e0 --- /dev/null +++ b/plugins/protocolbuffers/csharp/v26.0/BUILD @@ -0,0 +1,7 @@ +cc_binary( + name = "protoc-gen-csharp", + srcs = ["csharp.cc"], + deps = [ + "//:protoc_lib", + ], +) diff --git a/plugins/protocolbuffers/csharp/v26.0/Dockerfile b/plugins/protocolbuffers/csharp/v26.0/Dockerfile new file mode 100644 index 000000000..ea30e574c --- /dev/null +++ b/plugins/protocolbuffers/csharp/v26.0/Dockerfile @@ -0,0 +1,24 @@ +# syntax=docker/dockerfile:1.5 +FROM debian:bookworm-20240311 AS build + +ARG TARGETARCH + +RUN apt-get update \ + && apt-get install -y curl git cmake build-essential g++ unzip zip +RUN arch=${TARGETARCH}; \ + if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \ + curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/7.0.2/bazel-7.0.2-linux-${arch} \ + && chmod +x /usr/local/bin/bazel + +WORKDIR /build +RUN curl -fsSL -o protoc.tar.gz https://github.com/protocolbuffers/protobuf/releases/download/v26.0/protobuf-26.0.tar.gz \ + && tar --strip-components=1 -zxf protoc.tar.gz \ + && rm protoc.tar.gz +RUN bazel build '//:protoc_lib' +COPY --link BUILD csharp.cc plugins/ +RUN bazel build '//plugins:protoc-gen-csharp.stripped' + +FROM gcr.io/distroless/cc-debian12:latest@sha256:e6ae66a5a343d7112167f9117c4e630cfffcd80db44e44302759ec13ddd2d22b +COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-csharp . +USER nobody +ENTRYPOINT ["/protoc-gen-csharp"] diff --git a/plugins/protocolbuffers/csharp/v26.0/buf.plugin.yaml b/plugins/protocolbuffers/csharp/v26.0/buf.plugin.yaml new file mode 100644 index 000000000..bd582bc74 --- /dev/null +++ b/plugins/protocolbuffers/csharp/v26.0/buf.plugin.yaml @@ -0,0 +1,9 @@ +version: v1 +name: buf.build/protocolbuffers/csharp +plugin_version: v26.0 +source_url: https://github.com/protocolbuffers/protobuf +description: Base types for C#. Generates message and enum types. +output_languages: + - csharp +spdx_license_id: BSD-3-Clause +license_url: https://github.com/protocolbuffers/protobuf/blob/v26.0/LICENSE diff --git a/plugins/protocolbuffers/csharp/v26.0/csharp.cc b/plugins/protocolbuffers/csharp/v26.0/csharp.cc new file mode 100644 index 000000000..a82366018 --- /dev/null +++ b/plugins/protocolbuffers/csharp/v26.0/csharp.cc @@ -0,0 +1,7 @@ +#include +#include + +int main(int argc, char *argv[]) { + google::protobuf::compiler::csharp::Generator generator; + return google::protobuf::compiler::PluginMain(argc, argv, &generator); +} diff --git a/plugins/protocolbuffers/java/v26.0/.dockerignore b/plugins/protocolbuffers/java/v26.0/.dockerignore new file mode 100644 index 000000000..9612bcbe0 --- /dev/null +++ b/plugins/protocolbuffers/java/v26.0/.dockerignore @@ -0,0 +1,4 @@ +* +!BUILD +!Dockerfile +!java.cc diff --git a/plugins/protocolbuffers/java/v26.0/BUILD b/plugins/protocolbuffers/java/v26.0/BUILD new file mode 100644 index 000000000..34a738a84 --- /dev/null +++ b/plugins/protocolbuffers/java/v26.0/BUILD @@ -0,0 +1,7 @@ +cc_binary( + name = "protoc-gen-java", + srcs = ["java.cc"], + deps = [ + "//:protoc_lib", + ], +) diff --git a/plugins/protocolbuffers/java/v26.0/Dockerfile b/plugins/protocolbuffers/java/v26.0/Dockerfile new file mode 100644 index 000000000..8471e0fd4 --- /dev/null +++ b/plugins/protocolbuffers/java/v26.0/Dockerfile @@ -0,0 +1,24 @@ +# syntax=docker/dockerfile:1.5 +FROM debian:bookworm-20240311 AS build + +ARG TARGETARCH + +RUN apt-get update \ + && apt-get install -y curl git cmake build-essential g++ unzip zip +RUN arch=${TARGETARCH}; \ + if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \ + curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/7.0.2/bazel-7.0.2-linux-${arch} \ + && chmod +x /usr/local/bin/bazel + +WORKDIR /build +RUN curl -fsSL -o protoc.tar.gz https://github.com/protocolbuffers/protobuf/releases/download/v26.0/protobuf-26.0.tar.gz \ + && tar --strip-components=1 -zxf protoc.tar.gz \ + && rm protoc.tar.gz +RUN bazel build '//:protoc_lib' +COPY --link BUILD java.cc plugins/ +RUN bazel build '//plugins:protoc-gen-java.stripped' + +FROM gcr.io/distroless/cc-debian12:latest@sha256:e6ae66a5a343d7112167f9117c4e630cfffcd80db44e44302759ec13ddd2d22b +COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-java . +USER nobody +ENTRYPOINT ["/protoc-gen-java"] diff --git a/plugins/protocolbuffers/java/v26.0/buf.plugin.yaml b/plugins/protocolbuffers/java/v26.0/buf.plugin.yaml new file mode 100644 index 000000000..327677b17 --- /dev/null +++ b/plugins/protocolbuffers/java/v26.0/buf.plugin.yaml @@ -0,0 +1,19 @@ +version: v1 +name: buf.build/protocolbuffers/java +plugin_version: v26.0 +source_url: https://github.com/protocolbuffers/protobuf +description: Base types for Java. Generates message and enum types. +output_languages: + - java +spdx_license_id: BSD-3-Clause +license_url: https://github.com/protocolbuffers/protobuf/blob/v26.0/LICENSE +registry: + maven: + deps: + - com.google.protobuf:protobuf-java:3.26.0 + additional_runtimes: + - name: lite + deps: + - com.google.protobuf:protobuf-javalite:3.26.0 + - build.buf:protobuf-javalite:3.26.0 + opts: [lite] diff --git a/plugins/protocolbuffers/java/v26.0/java.cc b/plugins/protocolbuffers/java/v26.0/java.cc new file mode 100644 index 000000000..bd5cb1386 --- /dev/null +++ b/plugins/protocolbuffers/java/v26.0/java.cc @@ -0,0 +1,7 @@ +#include +#include + +int main(int argc, char *argv[]) { + google::protobuf::compiler::java::JavaGenerator generator; + return google::protobuf::compiler::PluginMain(argc, argv, &generator); +} diff --git a/plugins/protocolbuffers/kotlin/v26.0/.dockerignore b/plugins/protocolbuffers/kotlin/v26.0/.dockerignore new file mode 100644 index 000000000..d02a40d82 --- /dev/null +++ b/plugins/protocolbuffers/kotlin/v26.0/.dockerignore @@ -0,0 +1,4 @@ +* +!BUILD +!Dockerfile +!kotlin.cc diff --git a/plugins/protocolbuffers/kotlin/v26.0/BUILD b/plugins/protocolbuffers/kotlin/v26.0/BUILD new file mode 100644 index 000000000..340328b4c --- /dev/null +++ b/plugins/protocolbuffers/kotlin/v26.0/BUILD @@ -0,0 +1,7 @@ +cc_binary( + name = "protoc-gen-kotlin", + srcs = ["kotlin.cc"], + deps = [ + "//:protoc_lib", + ], +) diff --git a/plugins/protocolbuffers/kotlin/v26.0/Dockerfile b/plugins/protocolbuffers/kotlin/v26.0/Dockerfile new file mode 100644 index 000000000..3d0f7f548 --- /dev/null +++ b/plugins/protocolbuffers/kotlin/v26.0/Dockerfile @@ -0,0 +1,24 @@ +# syntax=docker/dockerfile:1.5 +FROM debian:bookworm-20240311 AS build + +ARG TARGETARCH + +RUN apt-get update \ + && apt-get install -y curl git cmake build-essential g++ unzip zip +RUN arch=${TARGETARCH}; \ + if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \ + curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/7.0.2/bazel-7.0.2-linux-${arch} \ + && chmod +x /usr/local/bin/bazel + +WORKDIR /build +RUN curl -fsSL -o protoc.tar.gz https://github.com/protocolbuffers/protobuf/releases/download/v26.0/protobuf-26.0.tar.gz \ + && tar --strip-components=1 -zxf protoc.tar.gz \ + && rm protoc.tar.gz +RUN bazel build '//:protoc_lib' +COPY --link BUILD kotlin.cc plugins/ +RUN bazel build '//plugins:protoc-gen-kotlin.stripped' + +FROM gcr.io/distroless/cc-debian12:latest@sha256:e6ae66a5a343d7112167f9117c4e630cfffcd80db44e44302759ec13ddd2d22b +COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-kotlin . +USER nobody +ENTRYPOINT ["/protoc-gen-kotlin"] diff --git a/plugins/protocolbuffers/kotlin/v26.0/buf.plugin.yaml b/plugins/protocolbuffers/kotlin/v26.0/buf.plugin.yaml new file mode 100644 index 000000000..b3df709fb --- /dev/null +++ b/plugins/protocolbuffers/kotlin/v26.0/buf.plugin.yaml @@ -0,0 +1,27 @@ +version: v1 +name: buf.build/protocolbuffers/kotlin +plugin_version: v26.0 +source_url: https://github.com/protocolbuffers/protobuf +integration_guide_url: https://protobuf.dev/getting-started/kotlintutorial +description: Base types for Kotlin. Generates message and enum types. +deps: + - plugin: buf.build/protocolbuffers/java:v26.0 +output_languages: + - kotlin +spdx_license_id: BSD-3-Clause +license_url: https://github.com/protocolbuffers/protobuf/blob/v26.0/LICENSE +registry: + maven: + compiler: + kotlin: + version: 1.8.22 + deps: + - com.google.protobuf:protobuf-kotlin:3.26.0 + - org.jetbrains.kotlin:kotlin-stdlib:1.8.22 + - org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22 + additional_runtimes: + - name: lite + deps: + - com.google.protobuf:protobuf-kotlin-lite:3.26.0 + - org.jetbrains.kotlin:kotlin-stdlib:1.8.22 + opts: [lite] diff --git a/plugins/protocolbuffers/kotlin/v26.0/kotlin.cc b/plugins/protocolbuffers/kotlin/v26.0/kotlin.cc new file mode 100644 index 000000000..25cf6e5c6 --- /dev/null +++ b/plugins/protocolbuffers/kotlin/v26.0/kotlin.cc @@ -0,0 +1,7 @@ +#include +#include + +int main(int argc, char *argv[]) { + google::protobuf::compiler::java::KotlinGenerator generator; + return google::protobuf::compiler::PluginMain(argc, argv, &generator); +} diff --git a/plugins/protocolbuffers/objc/v26.0/.dockerignore b/plugins/protocolbuffers/objc/v26.0/.dockerignore new file mode 100644 index 000000000..28438c51d --- /dev/null +++ b/plugins/protocolbuffers/objc/v26.0/.dockerignore @@ -0,0 +1,4 @@ +* +!BUILD +!Dockerfile +!objectivec.cc diff --git a/plugins/protocolbuffers/objc/v26.0/BUILD b/plugins/protocolbuffers/objc/v26.0/BUILD new file mode 100644 index 000000000..cc22935a3 --- /dev/null +++ b/plugins/protocolbuffers/objc/v26.0/BUILD @@ -0,0 +1,7 @@ +cc_binary( + name = "protoc-gen-objectivec", + srcs = ["objectivec.cc"], + deps = [ + "//:protoc_lib", + ], +) diff --git a/plugins/protocolbuffers/objc/v26.0/Dockerfile b/plugins/protocolbuffers/objc/v26.0/Dockerfile new file mode 100644 index 000000000..1bff1fa77 --- /dev/null +++ b/plugins/protocolbuffers/objc/v26.0/Dockerfile @@ -0,0 +1,24 @@ +# syntax=docker/dockerfile:1.5 +FROM debian:bookworm-20240311 AS build + +ARG TARGETARCH + +RUN apt-get update \ + && apt-get install -y curl git cmake build-essential g++ unzip zip +RUN arch=${TARGETARCH}; \ + if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \ + curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/7.0.2/bazel-7.0.2-linux-${arch} \ + && chmod +x /usr/local/bin/bazel + +WORKDIR /build +RUN curl -fsSL -o protoc.tar.gz https://github.com/protocolbuffers/protobuf/releases/download/v26.0/protobuf-26.0.tar.gz \ + && tar --strip-components=1 -zxf protoc.tar.gz \ + && rm protoc.tar.gz +RUN bazel build '//:protoc_lib' +COPY --link BUILD objectivec.cc plugins/ +RUN bazel build '//plugins:protoc-gen-objectivec.stripped' + +FROM gcr.io/distroless/cc-debian12:latest@sha256:e6ae66a5a343d7112167f9117c4e630cfffcd80db44e44302759ec13ddd2d22b +COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-objectivec . +USER nobody +ENTRYPOINT ["/protoc-gen-objectivec"] diff --git a/plugins/protocolbuffers/objc/v26.0/buf.plugin.yaml b/plugins/protocolbuffers/objc/v26.0/buf.plugin.yaml new file mode 100644 index 000000000..8d7e13ce0 --- /dev/null +++ b/plugins/protocolbuffers/objc/v26.0/buf.plugin.yaml @@ -0,0 +1,9 @@ +version: v1 +name: buf.build/protocolbuffers/objc +plugin_version: v26.0 +source_url: https://github.com/protocolbuffers/protobuf +description: Base types for Objective-C. Generates message and enum types. +output_languages: + - objective_c +spdx_license_id: BSD-3-Clause +license_url: https://github.com/protocolbuffers/protobuf/blob/v26.0/LICENSE diff --git a/plugins/protocolbuffers/objc/v26.0/objectivec.cc b/plugins/protocolbuffers/objc/v26.0/objectivec.cc new file mode 100644 index 000000000..1fda20829 --- /dev/null +++ b/plugins/protocolbuffers/objc/v26.0/objectivec.cc @@ -0,0 +1,7 @@ +#include +#include + +int main(int argc, char *argv[]) { + google::protobuf::compiler::objectivec::ObjectiveCGenerator generator; + return google::protobuf::compiler::PluginMain(argc, argv, &generator); +} diff --git a/plugins/protocolbuffers/php/v26.0/.dockerignore b/plugins/protocolbuffers/php/v26.0/.dockerignore new file mode 100644 index 000000000..1cc459074 --- /dev/null +++ b/plugins/protocolbuffers/php/v26.0/.dockerignore @@ -0,0 +1,4 @@ +* +!BUILD +!Dockerfile +!php.cc diff --git a/plugins/protocolbuffers/php/v26.0/BUILD b/plugins/protocolbuffers/php/v26.0/BUILD new file mode 100644 index 000000000..a813f9104 --- /dev/null +++ b/plugins/protocolbuffers/php/v26.0/BUILD @@ -0,0 +1,7 @@ +cc_binary( + name = "protoc-gen-php", + srcs = ["php.cc"], + deps = [ + "//:protoc_lib", + ], +) diff --git a/plugins/protocolbuffers/php/v26.0/Dockerfile b/plugins/protocolbuffers/php/v26.0/Dockerfile new file mode 100644 index 000000000..002e154b3 --- /dev/null +++ b/plugins/protocolbuffers/php/v26.0/Dockerfile @@ -0,0 +1,24 @@ +# syntax=docker/dockerfile:1.5 +FROM debian:bookworm-20240311 AS build + +ARG TARGETARCH + +RUN apt-get update \ + && apt-get install -y curl git cmake build-essential g++ unzip zip +RUN arch=${TARGETARCH}; \ + if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \ + curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/7.0.2/bazel-7.0.2-linux-${arch} \ + && chmod +x /usr/local/bin/bazel + +WORKDIR /build +RUN curl -fsSL -o protoc.tar.gz https://github.com/protocolbuffers/protobuf/releases/download/v26.0/protobuf-26.0.tar.gz \ + && tar --strip-components=1 -zxf protoc.tar.gz \ + && rm protoc.tar.gz +RUN bazel build '//:protoc_lib' +COPY --link BUILD php.cc plugins/ +RUN bazel build '//plugins:protoc-gen-php.stripped' + +FROM gcr.io/distroless/cc-debian12:latest@sha256:e6ae66a5a343d7112167f9117c4e630cfffcd80db44e44302759ec13ddd2d22b +COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-php . +USER nobody +ENTRYPOINT ["/protoc-gen-php"] diff --git a/plugins/protocolbuffers/php/v26.0/buf.plugin.yaml b/plugins/protocolbuffers/php/v26.0/buf.plugin.yaml new file mode 100644 index 000000000..9e7fa898d --- /dev/null +++ b/plugins/protocolbuffers/php/v26.0/buf.plugin.yaml @@ -0,0 +1,9 @@ +version: v1 +name: buf.build/protocolbuffers/php +plugin_version: v26.0 +source_url: https://github.com/protocolbuffers/protobuf +description: Base types for PHP. Generates message and enum types. +output_languages: + - php +spdx_license_id: BSD-3-Clause +license_url: https://github.com/protocolbuffers/protobuf/blob/v26.0/LICENSE diff --git a/plugins/protocolbuffers/php/v26.0/php.cc b/plugins/protocolbuffers/php/v26.0/php.cc new file mode 100644 index 000000000..107efe882 --- /dev/null +++ b/plugins/protocolbuffers/php/v26.0/php.cc @@ -0,0 +1,7 @@ +#include +#include + +int main(int argc, char *argv[]) { + google::protobuf::compiler::php::Generator generator; + return google::protobuf::compiler::PluginMain(argc, argv, &generator); +} diff --git a/plugins/protocolbuffers/pyi/v26.0/.dockerignore b/plugins/protocolbuffers/pyi/v26.0/.dockerignore new file mode 100644 index 000000000..54ca5b118 --- /dev/null +++ b/plugins/protocolbuffers/pyi/v26.0/.dockerignore @@ -0,0 +1,4 @@ +* +!BUILD +!Dockerfile +!pyi.cc diff --git a/plugins/protocolbuffers/pyi/v26.0/BUILD b/plugins/protocolbuffers/pyi/v26.0/BUILD new file mode 100644 index 000000000..89eebd092 --- /dev/null +++ b/plugins/protocolbuffers/pyi/v26.0/BUILD @@ -0,0 +1,8 @@ +# Create a standalone binary to generate Python .pyi files +cc_binary( + name = "protoc-gen-pyi", + srcs = ["pyi.cc"], + deps = [ + "//:protoc_lib", + ], +) diff --git a/plugins/protocolbuffers/pyi/v26.0/Dockerfile b/plugins/protocolbuffers/pyi/v26.0/Dockerfile new file mode 100644 index 000000000..70985092c --- /dev/null +++ b/plugins/protocolbuffers/pyi/v26.0/Dockerfile @@ -0,0 +1,24 @@ +# syntax=docker/dockerfile:1.5 +FROM debian:bookworm-20240311 AS build + +ARG TARGETARCH + +RUN apt-get update \ + && apt-get install -y curl git cmake build-essential g++ unzip zip +RUN arch=${TARGETARCH}; \ + if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \ + curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/7.0.2/bazel-7.0.2-linux-${arch} \ + && chmod +x /usr/local/bin/bazel + +WORKDIR /build +RUN curl -fsSL -o protoc.tar.gz https://github.com/protocolbuffers/protobuf/releases/download/v26.0/protobuf-26.0.tar.gz \ + && tar --strip-components=1 -zxf protoc.tar.gz \ + && rm protoc.tar.gz +RUN bazel build '//:protoc_lib' +COPY BUILD pyi.cc plugins/ +RUN bazel build '//plugins:protoc-gen-pyi.stripped' + +FROM gcr.io/distroless/cc-debian12:latest@sha256:e6ae66a5a343d7112167f9117c4e630cfffcd80db44e44302759ec13ddd2d22b +COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-pyi . +USER nobody +ENTRYPOINT ["/protoc-gen-pyi"] diff --git a/plugins/protocolbuffers/pyi/v26.0/buf.plugin.yaml b/plugins/protocolbuffers/pyi/v26.0/buf.plugin.yaml new file mode 100644 index 000000000..222b88093 --- /dev/null +++ b/plugins/protocolbuffers/pyi/v26.0/buf.plugin.yaml @@ -0,0 +1,18 @@ +version: v1 +name: buf.build/protocolbuffers/pyi +plugin_version: v26.0 +source_url: https://github.com/protocolbuffers/protobuf +description: Base types for Python Stubs. Generates stub files for message and enum types. +output_languages: + - python +spdx_license_id: BSD-3-Clause +license_url: https://github.com/protocolbuffers/protobuf/blob/v26.0/LICENSE +registry: + python: + package_type: "stub-only" + # https://github.com/protocolbuffers/protobuf/blob/v26.0/python/setup.py#L434 + requires_python: ">=3.8" + deps: + # https://pypi.org/project/protobuf/ + - "protobuf" + - "types-protobuf" diff --git a/plugins/protocolbuffers/pyi/v26.0/pyi.cc b/plugins/protocolbuffers/pyi/v26.0/pyi.cc new file mode 100644 index 000000000..4d32abebf --- /dev/null +++ b/plugins/protocolbuffers/pyi/v26.0/pyi.cc @@ -0,0 +1,8 @@ +#include +#include + +// Standalone binary to generate Python .pyi files +int main(int argc, char *argv[]) { + google::protobuf::compiler::python::PyiGenerator generator; + return google::protobuf::compiler::PluginMain(argc, argv, &generator); +} diff --git a/plugins/protocolbuffers/python/v26.0/.dockerignore b/plugins/protocolbuffers/python/v26.0/.dockerignore new file mode 100644 index 000000000..ee7c3bab2 --- /dev/null +++ b/plugins/protocolbuffers/python/v26.0/.dockerignore @@ -0,0 +1,4 @@ +* +!BUILD +!Dockerfile +!python.cc diff --git a/plugins/protocolbuffers/python/v26.0/BUILD b/plugins/protocolbuffers/python/v26.0/BUILD new file mode 100644 index 000000000..013f4312b --- /dev/null +++ b/plugins/protocolbuffers/python/v26.0/BUILD @@ -0,0 +1,7 @@ +cc_binary( + name = "protoc-gen-python", + srcs = ["python.cc"], + deps = [ + "//:protoc_lib", + ], +) diff --git a/plugins/protocolbuffers/python/v26.0/Dockerfile b/plugins/protocolbuffers/python/v26.0/Dockerfile new file mode 100644 index 000000000..3b53ce2af --- /dev/null +++ b/plugins/protocolbuffers/python/v26.0/Dockerfile @@ -0,0 +1,24 @@ +# syntax=docker/dockerfile:1.5 +FROM debian:bookworm-20240311 AS build + +ARG TARGETARCH + +RUN apt-get update \ + && apt-get install -y curl git cmake build-essential g++ unzip zip +RUN arch=${TARGETARCH}; \ + if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \ + curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/7.0.2/bazel-7.0.2-linux-${arch} \ + && chmod +x /usr/local/bin/bazel + +WORKDIR /build +RUN curl -fsSL -o protoc.tar.gz https://github.com/protocolbuffers/protobuf/releases/download/v26.0/protobuf-26.0.tar.gz \ + && tar --strip-components=1 -zxf protoc.tar.gz \ + && rm protoc.tar.gz +RUN bazel build '//:protoc_lib' +COPY --link BUILD python.cc plugins/ +RUN bazel build '//plugins:protoc-gen-python.stripped' + +FROM gcr.io/distroless/cc-debian12:latest@sha256:e6ae66a5a343d7112167f9117c4e630cfffcd80db44e44302759ec13ddd2d22b +COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-python . +USER nobody +ENTRYPOINT ["/protoc-gen-python"] diff --git a/plugins/protocolbuffers/python/v26.0/buf.plugin.yaml b/plugins/protocolbuffers/python/v26.0/buf.plugin.yaml new file mode 100644 index 000000000..6cd0efec9 --- /dev/null +++ b/plugins/protocolbuffers/python/v26.0/buf.plugin.yaml @@ -0,0 +1,17 @@ +version: v1 +name: buf.build/protocolbuffers/python +plugin_version: v26.0 +source_url: https://github.com/protocolbuffers/protobuf +description: Base types for Python. Generates message and enum types. +output_languages: + - python +spdx_license_id: BSD-3-Clause +license_url: https://github.com/protocolbuffers/protobuf/blob/v26.0/LICENSE +registry: + python: + package_type: "runtime" + # https://github.com/protocolbuffers/protobuf/blob/v26.0/python/setup.py#L434 + requires_python: ">=3.8" + deps: + # https://pypi.org/project/protobuf/ + - "protobuf" diff --git a/plugins/protocolbuffers/python/v26.0/python.cc b/plugins/protocolbuffers/python/v26.0/python.cc new file mode 100644 index 000000000..f8a9f636d --- /dev/null +++ b/plugins/protocolbuffers/python/v26.0/python.cc @@ -0,0 +1,7 @@ +#include +#include + +int main(int argc, char *argv[]) { + google::protobuf::compiler::python::Generator generator; + return google::protobuf::compiler::PluginMain(argc, argv, &generator); +} diff --git a/plugins/protocolbuffers/ruby/v26.0/.dockerignore b/plugins/protocolbuffers/ruby/v26.0/.dockerignore new file mode 100644 index 000000000..2bdb552e6 --- /dev/null +++ b/plugins/protocolbuffers/ruby/v26.0/.dockerignore @@ -0,0 +1,4 @@ +* +!BUILD +!Dockerfile +!ruby.cc diff --git a/plugins/protocolbuffers/ruby/v26.0/BUILD b/plugins/protocolbuffers/ruby/v26.0/BUILD new file mode 100644 index 000000000..8bd93e181 --- /dev/null +++ b/plugins/protocolbuffers/ruby/v26.0/BUILD @@ -0,0 +1,7 @@ +cc_binary( + name = "protoc-gen-ruby", + srcs = ["ruby.cc"], + deps = [ + "//:protoc_lib", + ], +) diff --git a/plugins/protocolbuffers/ruby/v26.0/Dockerfile b/plugins/protocolbuffers/ruby/v26.0/Dockerfile new file mode 100644 index 000000000..11c449665 --- /dev/null +++ b/plugins/protocolbuffers/ruby/v26.0/Dockerfile @@ -0,0 +1,24 @@ +# syntax=docker/dockerfile:1.5 +FROM debian:bookworm-20240311 AS build + +ARG TARGETARCH + +RUN apt-get update \ + && apt-get install -y curl git cmake build-essential g++ unzip zip +RUN arch=${TARGETARCH}; \ + if [ "${arch}" = "amd64" ]; then arch="x86_64"; fi; \ + curl -fsSL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazel/releases/download/7.0.2/bazel-7.0.2-linux-${arch} \ + && chmod +x /usr/local/bin/bazel + +WORKDIR /build +RUN curl -fsSL -o protoc.tar.gz https://github.com/protocolbuffers/protobuf/releases/download/v26.0/protobuf-26.0.tar.gz \ + && tar --strip-components=1 -zxf protoc.tar.gz \ + && rm protoc.tar.gz +RUN bazel build '//:protoc_lib' +COPY --link BUILD ruby.cc plugins/ +RUN bazel build '//plugins:protoc-gen-ruby.stripped' + +FROM gcr.io/distroless/cc-debian12:latest@sha256:e6ae66a5a343d7112167f9117c4e630cfffcd80db44e44302759ec13ddd2d22b +COPY --from=build --link --chmod=0755 /build/bazel-bin/plugins/protoc-gen-ruby . +USER nobody +ENTRYPOINT ["/protoc-gen-ruby"] diff --git a/plugins/protocolbuffers/ruby/v26.0/buf.plugin.yaml b/plugins/protocolbuffers/ruby/v26.0/buf.plugin.yaml new file mode 100644 index 000000000..b31fbccb7 --- /dev/null +++ b/plugins/protocolbuffers/ruby/v26.0/buf.plugin.yaml @@ -0,0 +1,9 @@ +version: v1 +name: buf.build/protocolbuffers/ruby +plugin_version: v26.0 +source_url: https://github.com/protocolbuffers/protobuf +description: Base types for Ruby. Generates message and enum types. +output_languages: + - ruby +spdx_license_id: BSD-3-Clause +license_url: https://github.com/protocolbuffers/protobuf/blob/v26.0/LICENSE diff --git a/plugins/protocolbuffers/ruby/v26.0/ruby.cc b/plugins/protocolbuffers/ruby/v26.0/ruby.cc new file mode 100644 index 000000000..73ba6a6ae --- /dev/null +++ b/plugins/protocolbuffers/ruby/v26.0/ruby.cc @@ -0,0 +1,7 @@ +#include +#include + +int main(int argc, char *argv[]) { + google::protobuf::compiler::ruby::Generator generator; + return google::protobuf::compiler::PluginMain(argc, argv, &generator); +} diff --git a/tests/testdata/buf.build/community/timostamm-protobuf-ts/v2.9.4/eliza/plugin.sum b/tests/testdata/buf.build/community/timostamm-protobuf-ts/v2.9.4/eliza/plugin.sum new file mode 100644 index 000000000..83f4fd662 --- /dev/null +++ b/tests/testdata/buf.build/community/timostamm-protobuf-ts/v2.9.4/eliza/plugin.sum @@ -0,0 +1 @@ +h1:bienXKMxWSDNmeeMJeC8Btf2XxSlE3dUcfbf4WnhvJw= diff --git a/tests/testdata/buf.build/community/timostamm-protobuf-ts/v2.9.4/petapis/plugin.sum b/tests/testdata/buf.build/community/timostamm-protobuf-ts/v2.9.4/petapis/plugin.sum new file mode 100644 index 000000000..8d06c9f51 --- /dev/null +++ b/tests/testdata/buf.build/community/timostamm-protobuf-ts/v2.9.4/petapis/plugin.sum @@ -0,0 +1 @@ +h1:unusA2wFZyNetqw3QijzjjNQx/y8nKiMIIkWWsxszGs= diff --git a/tests/testdata/buf.build/protocolbuffers/cpp/v26.0/eliza/plugin.sum b/tests/testdata/buf.build/protocolbuffers/cpp/v26.0/eliza/plugin.sum new file mode 100644 index 000000000..1ad21dc57 --- /dev/null +++ b/tests/testdata/buf.build/protocolbuffers/cpp/v26.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:q5gV3tlIlAJW64DZt2fspsRUQi40sFHuGi8nZFg7K/o= diff --git a/tests/testdata/buf.build/protocolbuffers/cpp/v26.0/petapis/plugin.sum b/tests/testdata/buf.build/protocolbuffers/cpp/v26.0/petapis/plugin.sum new file mode 100644 index 000000000..16f30f953 --- /dev/null +++ b/tests/testdata/buf.build/protocolbuffers/cpp/v26.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:AGz+EcAXEax5ePx7FQsTh0vUzRd3x0J2elsfrlbfjlI= diff --git a/tests/testdata/buf.build/protocolbuffers/csharp/v26.0/eliza/plugin.sum b/tests/testdata/buf.build/protocolbuffers/csharp/v26.0/eliza/plugin.sum new file mode 100644 index 000000000..cf6454f42 --- /dev/null +++ b/tests/testdata/buf.build/protocolbuffers/csharp/v26.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:soCFp+ncf7jFtLJEwPIl0B+JYFA+/ew+/0sW2XjU60A= diff --git a/tests/testdata/buf.build/protocolbuffers/csharp/v26.0/petapis/plugin.sum b/tests/testdata/buf.build/protocolbuffers/csharp/v26.0/petapis/plugin.sum new file mode 100644 index 000000000..5cdbfdd26 --- /dev/null +++ b/tests/testdata/buf.build/protocolbuffers/csharp/v26.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:ghegiuGbWLJ4Y3aB9KyojZPqMV7jcjB0gyfuPQ6J8gU= diff --git a/tests/testdata/buf.build/protocolbuffers/java/v26.0/eliza/plugin.sum b/tests/testdata/buf.build/protocolbuffers/java/v26.0/eliza/plugin.sum new file mode 100644 index 000000000..5dcf1f90c --- /dev/null +++ b/tests/testdata/buf.build/protocolbuffers/java/v26.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:vRZbE0sEIvlSJXci/17s9tV4I+rjIhwqXhxvVgGSzOs= diff --git a/tests/testdata/buf.build/protocolbuffers/java/v26.0/petapis/plugin.sum b/tests/testdata/buf.build/protocolbuffers/java/v26.0/petapis/plugin.sum new file mode 100644 index 000000000..42b78e44b --- /dev/null +++ b/tests/testdata/buf.build/protocolbuffers/java/v26.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:I9Ya1yjgt2OBrlv8A1I4K38YK03kNWWL+oFs3E1tDSo= diff --git a/tests/testdata/buf.build/protocolbuffers/kotlin/v26.0/eliza/plugin.sum b/tests/testdata/buf.build/protocolbuffers/kotlin/v26.0/eliza/plugin.sum new file mode 100644 index 000000000..f8447685d --- /dev/null +++ b/tests/testdata/buf.build/protocolbuffers/kotlin/v26.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:0ZuiLYGk3o4fFrZg82O6Xx8IRqOL24wL628tpzQexZw= diff --git a/tests/testdata/buf.build/protocolbuffers/kotlin/v26.0/petapis/plugin.sum b/tests/testdata/buf.build/protocolbuffers/kotlin/v26.0/petapis/plugin.sum new file mode 100644 index 000000000..542ce8ba4 --- /dev/null +++ b/tests/testdata/buf.build/protocolbuffers/kotlin/v26.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:0IA4KudGmGCga07CLqcLv2o27GCdD2GEO4nvqoYJNys= diff --git a/tests/testdata/buf.build/protocolbuffers/objc/v26.0/eliza/plugin.sum b/tests/testdata/buf.build/protocolbuffers/objc/v26.0/eliza/plugin.sum new file mode 100644 index 000000000..b76c2719b --- /dev/null +++ b/tests/testdata/buf.build/protocolbuffers/objc/v26.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:V/X2I7Eu08kyWPAlQIj/LRtG6lwtjjjXxcwGl90WTEQ= diff --git a/tests/testdata/buf.build/protocolbuffers/objc/v26.0/petapis/plugin.sum b/tests/testdata/buf.build/protocolbuffers/objc/v26.0/petapis/plugin.sum new file mode 100644 index 000000000..9baeccb96 --- /dev/null +++ b/tests/testdata/buf.build/protocolbuffers/objc/v26.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:oujszkpBJwMfJ8If06YwYLprNv3XE/PwAukYjE4DteY= diff --git a/tests/testdata/buf.build/protocolbuffers/php/v26.0/eliza/plugin.sum b/tests/testdata/buf.build/protocolbuffers/php/v26.0/eliza/plugin.sum new file mode 100644 index 000000000..1f842f57a --- /dev/null +++ b/tests/testdata/buf.build/protocolbuffers/php/v26.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:oaWEb2pmB1s/DM68iCOGew6VGorCXObRJ0e3M1o21xk= diff --git a/tests/testdata/buf.build/protocolbuffers/php/v26.0/petapis/plugin.sum b/tests/testdata/buf.build/protocolbuffers/php/v26.0/petapis/plugin.sum new file mode 100644 index 000000000..370239737 --- /dev/null +++ b/tests/testdata/buf.build/protocolbuffers/php/v26.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:h3V5FOSq5TapwHXHSHQm7Ekjc2z/xgaOguToz18p+aI= diff --git a/tests/testdata/buf.build/protocolbuffers/pyi/v26.0/eliza/plugin.sum b/tests/testdata/buf.build/protocolbuffers/pyi/v26.0/eliza/plugin.sum new file mode 100644 index 000000000..196fe700f --- /dev/null +++ b/tests/testdata/buf.build/protocolbuffers/pyi/v26.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:G5FqoiiggweB/wzLjL0N+pmAmS9MVvZ0r88nEeOKuWg= diff --git a/tests/testdata/buf.build/protocolbuffers/pyi/v26.0/petapis/plugin.sum b/tests/testdata/buf.build/protocolbuffers/pyi/v26.0/petapis/plugin.sum new file mode 100644 index 000000000..4d6c0bdb4 --- /dev/null +++ b/tests/testdata/buf.build/protocolbuffers/pyi/v26.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:yGQNs1uA0Kxe7D26svDauCkaVnqJKw60EztlQUbbxlo= diff --git a/tests/testdata/buf.build/protocolbuffers/python/v26.0/eliza/plugin.sum b/tests/testdata/buf.build/protocolbuffers/python/v26.0/eliza/plugin.sum new file mode 100644 index 000000000..74d792ae2 --- /dev/null +++ b/tests/testdata/buf.build/protocolbuffers/python/v26.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:ZgXvyfHImNlwxWzoPiNRpIMnkt/3z1Czj1MIIzVpyZQ= diff --git a/tests/testdata/buf.build/protocolbuffers/python/v26.0/petapis/plugin.sum b/tests/testdata/buf.build/protocolbuffers/python/v26.0/petapis/plugin.sum new file mode 100644 index 000000000..e1ea7034d --- /dev/null +++ b/tests/testdata/buf.build/protocolbuffers/python/v26.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:Y8w13mGIQLk/edbG7mm+Ayxpg/CsnwtZslqplyR7meA= diff --git a/tests/testdata/buf.build/protocolbuffers/ruby/v26.0/eliza/plugin.sum b/tests/testdata/buf.build/protocolbuffers/ruby/v26.0/eliza/plugin.sum new file mode 100644 index 000000000..154470232 --- /dev/null +++ b/tests/testdata/buf.build/protocolbuffers/ruby/v26.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:wL1Q3+8iavxHmdyq5u83vd727a1AWCxrMG95KTx7C+Y= diff --git a/tests/testdata/buf.build/protocolbuffers/ruby/v26.0/petapis/plugin.sum b/tests/testdata/buf.build/protocolbuffers/ruby/v26.0/petapis/plugin.sum new file mode 100644 index 000000000..e3e7d09f4 --- /dev/null +++ b/tests/testdata/buf.build/protocolbuffers/ruby/v26.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:MGkHm05RCCLhPfU20vGzQ4ZpJgM9pJ1Zehn2jZyCzVA=