From a74131a0639480b4f0f01efec5a4e6a0aac48d7d Mon Sep 17 00:00:00 2001 From: per1234 Date: Tue, 15 Oct 2024 23:59:26 -0700 Subject: [PATCH] Add support for dependencies preparation to `general:cache-dep-licenses` task The `general:cache-dep-licenses` task is used to generate metadata about the licenses of the project's dependencies. When using some dependency management systems, it is necessary to run an operation via the dependency management tool prior to generating the metadata. A task call was added to the `general:cache-dep-licenses` task in order to allow it to be used with such project types. It happens that such a preparatory operation is not necessary with the Go modules dependency management system used by this project, so the preparation task is left empty. --- Taskfile.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Taskfile.yml b/Taskfile.yml index 308fa122..7b48829b 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -157,6 +157,8 @@ tasks: # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-dependencies-task/Taskfile.yml general:cache-dep-licenses: desc: Cache dependency license metadata + deps: + - task: general:prepare-deps cmds: - | if ! which licensed &>/dev/null; then @@ -215,6 +217,11 @@ tasks: cmds: - npx prettier --write . + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-dependencies-task/Taskfile.yml + general:prepare-deps: + desc: Prepare project dependencies for license check + # No preparation is needed for Go module-based projects. + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/go-task/Taskfile.yml go:build: desc: Build the Go code