Skip to content

Commit ddebd11

Browse files
Taskfile: use buf instead of protoc
1 parent 4268e9e commit ddebd11

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Diff for: Taskfile.yml

+10-3
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,13 @@ tasks:
232232
- protoc:check
233233
- protoc:format
234234
- protoc:compile
235+
- protobc:breaking-change-detection
235236

236237
protoc:compile:
237238
desc: Compile protobuf definitions
238239
cmds:
239-
- '{{ default "protoc" .PROTOC_BINARY }} --proto_path=rpc --go_out=./rpc --go_opt=paths=source_relative --go-grpc_out=./rpc --go-grpc_opt=paths=source_relative ./rpc/cc/arduino/cli/commands/v1/*.proto'
240+
- buf dep update
241+
- buf generate
240242

241243
protoc:docs:
242244
desc: Generate docs for protobuf definitions
@@ -251,7 +253,7 @@ tasks:
251253
protoc:check:
252254
desc: Perform linting of the protobuf definitions
253255
cmds:
254-
- buf lint rpc
256+
- buf lint
255257

256258
protoc:collect:
257259
desc: Create a zip file containing all .proto files in DIST_DIR
@@ -263,7 +265,12 @@ tasks:
263265
protoc:format:
264266
desc: Perform formatting of the protobuf definitions
265267
cmds:
266-
- clang-format -i rpc/cc/arduino/cli/*/*/*.proto
268+
- buf format --write --exit-code
269+
270+
protobc:breaking-change-detection:
271+
desc: Detect protobuf breaking changes
272+
cmds:
273+
- buf breaking --against '.git#branch=origin/master,subdir=rpc'
267274

268275
build:
269276
desc: Build the project

0 commit comments

Comments
 (0)