tools: allow alternative spellings of target name (ESP32-S2, ESP32S2)

by ignoring character case and hyphens in target name.
This commit is contained in:
Ivan Grokhotkov
2020-04-03 16:21:24 +02:00
parent 4d53c137e6
commit 7b79b52062
3 changed files with 32 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ import click
from idf_py_actions.constants import GENERATORS, SUPPORTED_TARGETS
from idf_py_actions.errors import FatalError
from idf_py_actions.global_options import global_options
from idf_py_actions.tools import ensure_build_directory, idf_version, merge_action_lists, realpath, run_target
from idf_py_actions.tools import ensure_build_directory, idf_version, merge_action_lists, realpath, run_target, TargetChoice
def action_extensions(base_actions, project_path):
@@ -379,7 +379,7 @@ def action_extensions(base_actions, project_path):
{
"names": ["idf-target"],
"nargs": 1,
"type": click.Choice(SUPPORTED_TARGETS),
"type": TargetChoice(SUPPORTED_TARGETS),
},
],
"dependencies": ["fullclean"],