feat: add task tag

This commit is contained in:
2026-08-02 16:42:15 +03:00
parent 48f8b2d5a9
commit 91a85f7141
4 changed files with 34 additions and 25 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
from collections import defaultdict
from pathlib import Path
from ..entry import Entry, EntryDetector
from ..entry import Entry, EntryDetector, TaskKey
from ..pipe.core import PipeParser, PipeRunner
from .resolve import PresetResolver, PresetResolverConfig
@@ -21,7 +21,7 @@ class PresetEntryDetector(EntryDetector):
return None
piperunner = PipeRunner(basepath)
tasks = defaultdict(list)
for preset in preset.presets.values():
for tag, preset in preset.presets.items():
if not piperunner.check_conditions(preset.conditions):
continue
for task_name, task_pack in preset.tasks.items():
@@ -37,7 +37,7 @@ class PresetEntryDetector(EntryDetector):
for k, v in task.variables.items()
}
)
tasks[task_name] += [
tasks[TaskKey(task_name, tag)] += [
command.format(**variables) for command in task.commands
]
if tasks: