Skip to content

Commit caa3427

Browse files
committed
[skip changelog] Don't error protobuf archive task if distribution folder already exists
The `protoc:collect` task generates a ZIP archive of the project's protocol buffer files for inclusion with the published builds. In the case of the nightly and release build workflows, the distribution folder the archive is generated into was already created by the build operations in the preceeding workflow job. Previously, the task (and thus entire build workflow) would fail in this case when attempting to create the folder that already exists: mkdir: cannot create directory ‘../dist’: File exists In addition to the obvious purpose, the `--parents` flag of the `mkdir` command also has the following additional effect: > no error if existing So adding this flag to the command resolves the spurious failure. It will create the folder when necessary, but simply carry on with the rest of the task when it does exist.
1 parent e4eb58b commit caa3427

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Taskfile.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ tasks:
236236
desc: Create a zip file containing all .proto files in DIST_DIR
237237
dir: rpc
238238
cmds:
239-
- mkdir ../{{.DIST_DIR}}
239+
- mkdir --parents ../{{.DIST_DIR}}
240240
- zip -r ../{{.DIST_DIR}}/{{.PROJECT_NAME}}_{{.VERSION}}_proto.zip * -i \*.proto
241241

242242
protoc:format:

0 commit comments

Comments
 (0)