Skip to content

Commit 434f29a

Browse files
committed
buf/comments: just specify inputs/outputs that matter
These are the only ones needed for the comment registry (rpk). This way you only need to run `buf generate` w/o specifying all the other paths.
1 parent 2a85f9c commit 434f29a

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/rpk-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ jobs:
7474
with:
7575
setup_only: true
7676
- name: Generate proto files
77-
run: buf generate --path proto/redpanda/core/admin/v2/shadow_link.proto --path proto/redpanda/core/common/v1/acl.proto --path proto/redpanda/core/common/v1/tls.proto
77+
run: buf generate
7878
- name: Check for uncommitted changes
7979
run: |
8080
if ! git diff --exit-code src/go/rpk/gen/; then
8181
git diff src/go/rpk/gen/
8282
echo "Error: Generated proto files are out of date"
83-
echo "Run 'buf generate --path proto/redpanda/core/admin/v2/shadow_link.proto --path proto/redpanda/core/common/v1/acl.proto --path proto/redpanda/core/common/v1/tls.proto' and commit the changes"
83+
echo "Run 'buf generate' and commit the changes"
8484
exit 1
8585
fi

buf.gen.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
version: v2
22
managed:
33
enabled: false
4+
inputs:
5+
- directory: .
6+
paths:
7+
- proto/redpanda/core/admin/v2/shadow_link.proto
8+
- proto/redpanda/core/common/v1/acl.proto
9+
- proto/redpanda/core/common/v1/tls.proto
410
plugins:
511
# Custom comment extraction plugin - we ONLY generate comments related files,
612
# The rest comes from buf.build/gen/go/redpandadata/core/protocolbuffers/go
@@ -9,9 +15,5 @@ plugins:
915
opt:
1016
- paths=import
1117
- Mproto/redpanda/core/admin/v2/shadow_link.proto=github.com/redpanda-data/redpanda/src/go/rpk/gen/protocomments/admin/v2
12-
- Mproto/redpanda/core/admin/v2/broker.proto=github.com/redpanda-data/redpanda/src/go/rpk/gen/protocomments/admin/v2
13-
- Mproto/redpanda/core/admin/v2/cluster.proto=github.com/redpanda-data/redpanda/src/go/rpk/gen/protocomments/admin/v2
14-
- Mproto/redpanda/core/admin/v2/kafka_connections.proto=github.com/redpanda-data/redpanda/src/go/rpk/gen/protocomments/admin/v2
1518
- Mproto/redpanda/core/common/v1/acl.proto=github.com/redpanda-data/redpanda/src/go/rpk/gen/protocomments/common/v1
16-
- Mproto/redpanda/core/common/v1/ntp.proto=github.com/redpanda-data/redpanda/src/go/rpk/gen/protocomments/common/v1
1719
- Mproto/redpanda/core/common/v1/tls.proto=github.com/redpanda-data/redpanda/src/go/rpk/gen/protocomments/common/v1

0 commit comments

Comments
 (0)