From 7782c89325c87d9d7099597f045b4d9d3d6c9497 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Mon, 23 Dec 2024 12:57:13 +0100 Subject: [PATCH] [skip-changelog] Small improvements in Taskfile about protocol buffer generation (#2793) * Do not run protoc tasks in parallel Otherwise if the format task changes the underlying files, it will make fail the other tasks. task: [protoc:breaking-change-detection] buf breaking --against '.git#branch=origin/master,subdir=rpc' task: [protoc:format] buf format --write --exit-code task: [protoc:check] buf lint task: [protoc:compile] buf dep update Failure: context canceled Failure: context canceled Failure: context canceled exit status 100 * Simplified taskfile * Do not exit with error if `buf format` formats a file This is the intended behaviour. --- Taskfile.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index 82d7999da35..08cd153a3be 100755 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -228,11 +228,11 @@ tasks: protoc: desc: Lint, format and compile protobuf definitions - deps: - - protoc:check - - protoc:format - - protoc:compile - - protoc:breaking-change-detection + cmds: + - task: protoc:format + - task: protoc:check + - task: protoc:compile + - task: protoc:breaking-change-detection protoc:compile: desc: Compile protobuf definitions @@ -243,8 +243,7 @@ tasks: protoc:docs: desc: Generate docs for protobuf definitions cmds: - - | - buf generate --template buf.doc.gen.yaml + - buf generate --template buf.doc.gen.yaml docs:include-configuration-json-schema: desc: Copy configuration JSON schema to make it available in documentation @@ -266,7 +265,7 @@ tasks: protoc:format: desc: Perform formatting of the protobuf definitions cmds: - - buf format --write --exit-code + - buf format --write protoc:breaking-change-detection: desc: Detect protobuf breaking changes