This is an automated email from the ASF dual-hosted git repository.

aw pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/yetus.git


The following commit(s) were added to refs/heads/main by this push:
     new e9f49e8  YETUS-1152. Upgrade buf (#246)
e9f49e8 is described below

commit e9f49e8b0550ef9e159ddbed4a0adc36323e3628
Author: Allen Wittenauer <[email protected]>
AuthorDate: Wed Dec 29 14:31:51 2021 -0800

    YETUS-1152. Upgrade buf (#246)
---
 .github/workflows/yetus.yml                                       | 4 ++++
 .../documentation/in-progress/precommit/plugins/buf.html.md       | 2 +-
 precommit/src/main/shell/plugins.d/buf.sh                         | 8 ++++----
 precommit/src/main/shell/test-patch-docker/Dockerfile             | 2 +-
 4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/yetus.yml b/.github/workflows/yetus.yml
index 81e04ef..f9d9874 100644
--- a/.github/workflows/yetus.yml
+++ b/.github/workflows/yetus.yml
@@ -18,6 +18,10 @@ name: Apache Yetus
 
 on: [push, pull_request]  # yamllint disable-line rule:truthy
 
+permissions:
+  statuses: write
+  checks: write
+
 jobs:
   build:
 
diff --git 
a/asf-site-src/source/documentation/in-progress/precommit/plugins/buf.html.md 
b/asf-site-src/source/documentation/in-progress/precommit/plugins/buf.html.md
index 2ce55fd..549287f 100644
--- 
a/asf-site-src/source/documentation/in-progress/precommit/plugins/buf.html.md
+++ 
b/asf-site-src/source/documentation/in-progress/precommit/plugins/buf.html.md
@@ -29,7 +29,7 @@ Test
 
 # Description
 
-[buf](https://github.com/bufbuild/buf) is a protobuf linter (`buflint`) and 
backward compatibility checker (`bufcompat`).
+[buf](https://github.com/bufbuild/buf) is a protobuf linter (`buflint`) and 
backward compatibility checker (`bufcompat`), version 0.34.0 or higher.
 In order to use either `buflint` or `bufcompat`, `buf` must also be enabled.
 
 # Environment Variables
diff --git a/precommit/src/main/shell/plugins.d/buf.sh 
b/precommit/src/main/shell/plugins.d/buf.sh
index 57dc526..11fef5c 100755
--- a/precommit/src/main/shell/plugins.d/buf.sh
+++ b/precommit/src/main/shell/plugins.d/buf.sh
@@ -145,10 +145,10 @@ function bufcompat_executor
   pushd "${BASEDIR}/${BUF_BASEDIR}" >/dev/null || return 1
 
   if [[ "${repostatus}" == "branch" ]]; then
-    "${BUF}" image build "${bufargs[@]}" -o "${PATCH_DIR}/buf-image.bin" 2>> 
"${PATCH_DIR}/${bufStderr}"
+    "${BUF}" build "${bufargs[@]}" -o "${PATCH_DIR}/buf-image.bin" 2>> 
"${PATCH_DIR}/${bufStderr}"
   elif [[ -f  "${PATCH_DIR}/buf-image.bin" ]]; then
-    "${BUF}" check breaking "${bufargs[@]}" \
-      --against-input "${PATCH_DIR}/buf-image.bin" \
+    "${BUF}" breaking "${bufargs[@]}" \
+      --against "${PATCH_DIR}/buf-image.bin" \
       2>> "${PATCH_DIR}/${bufStderr}" \
     | "${AWK}" "{print \"${BUF_BASEDIR}/\"\$0}" \
       > "${PATCH_DIR}/${repostatus}-bufcompat-result.txt" \
@@ -270,7 +270,7 @@ function buflint_executor
 
   pushd "${BASEDIR}/${BUF_BASEDIR}" >/dev/null || return 1
 
-  "${BUF}" check lint  "${bufargs[@]}" 2>> "${PATCH_DIR}/${bufStderr}" \
+  "${BUF}" lint "${bufargs[@]}" 2>> "${PATCH_DIR}/${bufStderr}" \
     | "${AWK}" "{print \"${BUF_BASEDIR}/\"\$0}" \
     | "${args[@]}" > "${PATCH_DIR}/${repostatus}-buflint-result.txt"
 
diff --git a/precommit/src/main/shell/test-patch-docker/Dockerfile 
b/precommit/src/main/shell/test-patch-docker/Dockerfile
index cc11059..8e7c61d 100644
--- a/precommit/src/main/shell/test-patch-docker/Dockerfile
+++ b/precommit/src/main/shell/test-patch-docker/Dockerfile
@@ -155,7 +155,7 @@ RUN if [[ "$(uname -m)" == "x86_64" ]]; then curl -sSL \
 # Install buf (protobuf lint)
 ####
 FROM yetusbase AS yetusbuf
-ARG BUF_VERSION=0.56.0
+ARG BUF_VERSION=1.0.0-rc10
 SHELL ["/bin/bash", "-o", "pipefail", "-c"]
 RUN curl -sSL \
       
https://github.com/bufbuild/buf/releases/download/v$BUF_VERSION/buf-Linux-"$(uname
 -m)".tar.gz \

Reply via email to