v0.31.0 is released - file and directory filtering via --path

17 views
Skip to first unread message

bufbuild-announce

unread,
Nov 16, 2020, 6:38:11 PM11/16/20
to bufbuild-announce
We have released Buf v0.31.0.

This changes the --file flag to --path. This flag is used to filter the actual Protobuf files built under an input. For example, with buf generate, this allows only generating stubs for a subset of your input:

# Only generate for the files in the directories proto/foo and proto/bar
$ buf generate --path proto/foo --path proto/bar

# Only generate for the files proto/foo/foo.proto and proto/foo/bar.proto
$ buf generate --path proto/foo/foo.proto --path proto/foo/bar.proto

# Only generate for the files in the directory proto/foo on your GitHub repository
$ buf generate --template buf.gen.yaml https://github.com/foo/bar.git --path proto/foo


Note that the --file flag continues to work, but prints a deprecation message.

This flag is available on the following commands:
  • buf build
  • buf check breaking
  • buf check lint
  • buf generate
This flag will also be available on the upcoming buf format command, stay tuned!
Reply all
Reply to author
Forward
0 new messages