diff --git a/Taskfile.yml b/Taskfile.yml index b8fb74c3..ded1df3a 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -143,6 +143,7 @@ tasks: # Check if ClangFormat is installed and the expected version clang-format:check-installed: + run: when_changed vars: EXPECTED_CLANG_FORMAT_VERSION: "{{default .DEFAULT_CLANG_FORMAT_VERSION .CLANG_FORMAT_VERSION}}" cmds: @@ -731,6 +732,7 @@ tasks: # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/npm-task/Taskfile.yml npm:install-deps: desc: Install dependencies managed by npm + run: when_changed dir: | "{{default "./" .PROJECT_PATH}}" cmds: @@ -834,7 +836,7 @@ tasks: # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml poetry:install: desc: Install Poetry - run: once + run: when_changed cmds: - | if ! which yq &>/dev/null; then @@ -883,11 +885,17 @@ tasks: # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml poetry:install-deps: - desc: Install dependencies managed by Poetry + desc: | + Install dependencies managed by Poetry. + Environment variable parameters: + - POETRY_GROUPS: Poetry dependency groups to install (default: install all dependencies). + run: when_changed deps: - task: poetry:install cmds: - - poetry install --no-root + - | + poetry install \ + {{if .POETRY_GROUPS}} --only {{.POETRY_GROUPS}} {{end}} # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml poetry:update-deps: diff --git a/workflow-templates/assets/check-markdown-task/Taskfile.yml b/workflow-templates/assets/check-markdown-task/Taskfile.yml index a968b975..5216f0dc 100644 --- a/workflow-templates/assets/check-markdown-task/Taskfile.yml +++ b/workflow-templates/assets/check-markdown-task/Taskfile.yml @@ -4,6 +4,7 @@ version: "3" tasks: docs:generate: desc: Create all generated documentation content + run: when_changed # This is an "umbrella" task used to call any documentation generation processes the project has. # It can be left empty if there are none. diff --git a/workflow-templates/assets/check-mkdocs-task/Taskfile.yml b/workflow-templates/assets/check-mkdocs-task/Taskfile.yml index e9b678bb..42fd5050 100644 --- a/workflow-templates/assets/check-mkdocs-task/Taskfile.yml +++ b/workflow-templates/assets/check-mkdocs-task/Taskfile.yml @@ -4,6 +4,7 @@ version: "3" tasks: docs:generate: desc: Create all generated documentation content + run: when_changed # This is an "umbrella" task used to call any documentation generation processes the project has. # It can be left empty if there are none. diff --git a/workflow-templates/assets/deploy-cobra-mkdocs-versioned-poetry/Taskfile.yml b/workflow-templates/assets/deploy-cobra-mkdocs-versioned-poetry/Taskfile.yml index bbd6a350..5d22935f 100644 --- a/workflow-templates/assets/deploy-cobra-mkdocs-versioned-poetry/Taskfile.yml +++ b/workflow-templates/assets/deploy-cobra-mkdocs-versioned-poetry/Taskfile.yml @@ -7,6 +7,7 @@ tasks: # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/deploy-cobra-mkdocs-versioned-poetry/Taskfile.yml docs:generate: desc: Create all generated documentation content + run: when_changed deps: - task: go:cli-docs cmds: diff --git a/workflow-templates/assets/npm-task/Taskfile.yml b/workflow-templates/assets/npm-task/Taskfile.yml index 0d28ec97..810ec9a6 100644 --- a/workflow-templates/assets/npm-task/Taskfile.yml +++ b/workflow-templates/assets/npm-task/Taskfile.yml @@ -7,6 +7,7 @@ tasks: # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/npm-task/Taskfile.yml npm:install-deps: desc: Install dependencies managed by npm + run: when_changed dir: | "{{default "./" .PROJECT_PATH}}" cmds: diff --git a/workflow-templates/assets/poetry-task/Taskfile.yml b/workflow-templates/assets/poetry-task/Taskfile.yml index 4b9e1e87..c3914122 100644 --- a/workflow-templates/assets/poetry-task/Taskfile.yml +++ b/workflow-templates/assets/poetry-task/Taskfile.yml @@ -5,7 +5,7 @@ tasks: # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml poetry:install: desc: Install Poetry - run: once + run: when_changed cmds: - | if ! which yq &>/dev/null; then