Skip to content

Commit

Permalink
Add support for dependencies preparation to `general:cache-dep-licens…
Browse files Browse the repository at this point in the history
…es` 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.
  • Loading branch information
per1234 committed Oct 16, 2024
1 parent 252186a commit a74131a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a74131a

Please sign in to comment.