Skip to content

Commit 136d25c

Browse files
authored
Merge pull request #233 from dmcgowan/update-protobuf-setup
2 parents 8a6e64d + 02f1a13 commit 136d25c

5 files changed

Lines changed: 41 additions & 60 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,16 @@ jobs:
116116
go-version: 'stable'
117117
id: go
118118

119+
- name: Read buf version
120+
id: buf-version
121+
working-directory: src/github.com/containerd/ttrpc
122+
run: echo "version=$(cat script/buf-version)" >> $GITHUB_OUTPUT
123+
119124
- name: Install buf
120125
uses: bufbuild/buf-action@v1
121126
with:
122127
setup_only: true
128+
version: ${{ steps.buf-version.outputs.version }}
123129

124130
- name: Install protoc-gen-go-ttrpc
125131
working-directory: src/github.com/containerd/ttrpc

integration/streaming/test.pb.go

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

script/buf-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.69.0

script/install-proto-tools

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright The containerd Authors.
4+
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
#
18+
# Install proto generation tools for local development.
19+
#
20+
# The buf version is read from script/buf-version, which is the single source
21+
# of truth shared with the CI workflow.
22+
#
23+
set -eu -o pipefail
24+
25+
cd "$(dirname "$0")/.."
26+
27+
BUF_VERSION=$(cat script/buf-version)
28+
29+
go install "github.com/bufbuild/buf/cmd/buf@v${BUF_VERSION}"
30+
go install ./cmd/protoc-gen-go-ttrpc
31+
go install ./cmd/protoc-gen-gogottrpc

script/install-protobuf

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)