Skip to content

Commit 23a22b6

Browse files
committed
merge: Remove generic prefix in UPPER and lower case.
Signed-off-by: Jos Verlinde <[email protected]>
1 parent 4d0e826 commit 23a22b6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/stubber/publish/merge_docstubs.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def board_folder_name(fw: Dict, *, version: Optional[str] = None):
3030
base = get_base(fw, version=version)
3131
folder_name = f"{base}-{fw['port']}" if fw["board"] in GENERIC else f"{base}-{fw['port']}-{fw['board']}"
3232
# do not force name to lowercase
33-
folder_name = folder_name.replace("-generic_", "-") # @GENERIC Prefix
33+
folder_name = folder_name.replace("-generic_", "-").replace("-GENERIC_", "-") # remove GENERIC Prefix
3434
return folder_name
3535

3636

@@ -86,7 +86,9 @@ def merge_all_docstubs(
8686
if candidate["version"] == "latest":
8787
# for the latest we do a bit more effort to get something 'good enough'
8888
# try to get the board_path from the last released version as the basis
89-
board_path = CONFIG.stub_path / board_folder_name(candidate, version=clean_version(CONFIG.stable_version, flat=True))
89+
board_path = CONFIG.stub_path / board_folder_name(
90+
candidate, version=clean_version(CONFIG.stable_version, flat=True)
91+
)
9092
# check again
9193
if board_path.exists():
9294
log.info(f"using {board_path.name} as the basis for {merged_path.name}")
@@ -101,7 +103,7 @@ def merge_all_docstubs(
101103
log.info(f"Merge docstubs for {merged_path.name} {candidate['version']}")
102104
result = copy_and_merge_docstubs(board_path, merged_path, doc_path)
103105
# Add methods from docstubs to the firmware stubs that do not exist in the firmware stubs
104-
add_machine_pin_call(merged_path, candidate['version'])
106+
add_machine_pin_call(merged_path, candidate["version"])
105107
if result:
106108
merged += 1
107109
log.info(f"merged {merged} of {len(candidates)} candidates")

0 commit comments

Comments
 (0)