Commit caa34276 authored by per1234's avatar per1234

[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.
parent e4eb58b7
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment