Skip to content

Commit 08fbeee

Browse files
committed
ci(stm32variant): warn user if filtered family requested
Signed-off-by: Frederic Pillon <[email protected]>
1 parent a5a7b97 commit 08fbeee

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

CI/update/stm32variant.py

+12
Original file line numberDiff line numberDiff line change
@@ -2647,6 +2647,11 @@ def manage_repo():
26472647

26482648
if args.family:
26492649
filtered_family = args.family.upper()
2650+
filtered_family = filtered_family.removeprefix("STM32")
2651+
while filtered_family.endswith("X"):
2652+
filtered_family = filtered_family.rstrip("X")
2653+
filtered_family = f"STM32{filtered_family}"
2654+
26502655
# Get all xml files
26512656
mcu_list = sorted(dirMCU.glob("STM32*.xml"))
26522657

@@ -2678,6 +2683,13 @@ def manage_repo():
26782683
and filtered_family not in mcu_family
26792684
or any(skp in mcu_refname for skp in refname_filter)
26802685
):
2686+
# Add a warning if filtered family is requested
2687+
if filtered_family and filtered_family not in refname_filter:
2688+
for skp in refname_filter:
2689+
if skp == filtered_family:
2690+
print(f"Requested family {filtered_family} is filtered!")
2691+
print("Please update the refname_filter list.")
2692+
quit()
26812693
xml_mcu.unlink()
26822694
continue
26832695

0 commit comments

Comments
 (0)