feat: add version task
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import operator
|
||||
from os import environ
|
||||
from pathlib import Path
|
||||
|
||||
from ..common.template import PathTemplate
|
||||
@@ -19,9 +20,15 @@ class PresetEntryDetector(EntryDetector):
|
||||
if preset.skip:
|
||||
return ENTRY_SKIP
|
||||
tasks = []
|
||||
for tag, preset in preset.presets.items():
|
||||
preset_variables: Variables = {"entry_path": basepath}
|
||||
global_variables = {f"env_{k.lower()}": v for k, v in environ.items()}
|
||||
presets = sorted(
|
||||
preset.presets.items(), key=lambda item: item[1].priority, reverse=True
|
||||
)
|
||||
for tag, preset in presets:
|
||||
preset_variables: Variables = {**global_variables, "entry_path": basepath}
|
||||
if preset.variables:
|
||||
if tag == "*":
|
||||
template.update_variables(preset.variables, global_variables)
|
||||
template.update_variables(preset.variables, preset_variables)
|
||||
if preset.conditions and not template.check_conditions(
|
||||
preset.conditions, preset_variables
|
||||
|
||||
Reference in New Issue
Block a user