Skip to content

Commit 9542392

Browse files
committed
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. Since this task is a standardized "asset" which is intended to be usable with any project, a call to a `general:prepare-deps` task was added to the `general:cache-dep-licenses` task in order to allow it to be used with such project types. The operation required by the specific dependencies management system in use is performed in the `general:prepare-deps` task. It happens that such a preparatory operation is not necessary with the Go modules dependency management system, so an empty task is provided for use in Go module-based projects. Since this project is Go module-based, the change is not essential. However, it is best to keep the asset in sync with the upstream copy to facilitate maintenance of the project infrastructure.
1 parent 1ec2d1b commit 9542392

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Taskfile.yml

+7
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ tasks:
9595
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-dependencies-task/Taskfile.yml
9696
general:cache-dep-licenses:
9797
desc: Cache dependency license metadata
98+
deps:
99+
- task: general:prepare-deps
98100
cmds:
99101
- |
100102
if ! which licensed &>/dev/null; then
@@ -142,6 +144,11 @@ tasks:
142144
codespell \
143145
--write-changes
144146
147+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-dependencies-task/Taskfile.yml
148+
general:prepare-deps:
149+
desc: Prepare project dependencies for license check
150+
# No preparation is needed for Go module-based projects.
151+
145152
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-task/Taskfile.yml
146153
go:fix:
147154
desc: Modernize usages of outdated APIs

0 commit comments

Comments
 (0)