Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[skip changelog] Don't error protobuf archive task if distribution fo…
…lder 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.
  • Loading branch information
per1234 committed Nov 6, 2022
commit a177740422ac65a0977f5dffa48312dbdb3a24e4
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ tasks:
desc: Create a zip file containing all .proto files in DIST_DIR
dir: rpc
cmds:
- mkdir ../{{.DIST_DIR}}
- mkdir --parents ../{{.DIST_DIR}}
- zip -r ../{{.DIST_DIR}}/{{.PROJECT_NAME}}_{{.VERSION}}_proto.zip * -i \*.proto

protoc:format:
Expand Down