Skip to content

Commit

Permalink
ci(stm32variant): warn user if filtered family requested
Browse files Browse the repository at this point in the history
Signed-off-by: Frederic Pillon <[email protected]>
  • Loading branch information
fpistm committed Jul 5, 2024
1 parent a5a7b97 commit 08fbeee
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CI/update/stm32variant.py
Original file line number Diff line number Diff line change
Expand Up @@ -2647,6 +2647,11 @@ def manage_repo():

if args.family:
filtered_family = args.family.upper()
filtered_family = filtered_family.removeprefix("STM32")
while filtered_family.endswith("X"):
filtered_family = filtered_family.rstrip("X")
filtered_family = f"STM32{filtered_family}"

# Get all xml files
mcu_list = sorted(dirMCU.glob("STM32*.xml"))

Expand Down Expand Up @@ -2678,6 +2683,13 @@ def manage_repo():
and filtered_family not in mcu_family
or any(skp in mcu_refname for skp in refname_filter)
):
# Add a warning if filtered family is requested
if filtered_family and filtered_family not in refname_filter:
for skp in refname_filter:
if skp == filtered_family:
print(f"Requested family {filtered_family} is filtered!")
print("Please update the refname_filter list.")
quit()
xml_mcu.unlink()
continue

Expand Down

0 comments on commit 08fbeee

Please sign in to comment.