Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(task): add support for task wildcards #27007

Merged
merged 7 commits into from
Jan 30, 2025
Merged

feat(task): add support for task wildcards #27007

merged 7 commits into from
Jan 30, 2025

Conversation

marvinhagemeister
Copy link
Contributor

@marvinhagemeister marvinhagemeister commented Nov 22, 2024

This PR adds support for passing wildcard tasks. All matched tasks are sorted in case they have dependencies. Tasks already in the dependency tree will be pruned so that every task only runs once.

{
  "tasks": {
    "foo-1": "echo 'foo-1'",
    "foo-2": "echo 'foo-2'"
  }
}
$ deno task "foo-*"
Task foo-1 echo 'foo-1'
foo-1
Task foo-2 echo 'foo-2'
foo-2

The changes in the PR look a little bigger than they really are due to formatting. For the most part, I've only needed to hoist up the task matching logic.

Closes #26944
Closes #21530

@bartlomieju bartlomieju added this to the 2.2.0 milestone Nov 23, 2024
@bartlomieju
Copy link
Member

Update https://github.com/denoland/docs/ before landing.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bartlomieju bartlomieju merged commit c44b05c into main Jan 30, 2025
18 checks passed
@bartlomieju bartlomieju deleted the task-wildcard branch January 30, 2025 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for wildcards in deno task [deno task] suport filters/patterns/wildcards
2 participants