Skip to content

Commit af3b3f6

Browse files
committed
ci(variant): allow launch outside script path
Signed-off-by: Frederic Pillon <[email protected]>
1 parent 93e45ec commit af3b3f6

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

CI/update/stm32variant.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -2257,7 +2257,7 @@ def merge_dir(out_temp_path, group_mcu_dir, mcu_family, periph_xml, variant_exp)
22572257
# Aggregating all generated files
22582258
def aggregate_dir():
22592259
# Get mcu_family directories
2260-
out_temp_path = cur_dir / "variants"
2260+
out_temp_path = tmp_dir
22612261
mcu_families = sorted(out_temp_path.glob("STM32*/"))
22622262

22632263
group_mcu_dir = []
@@ -2495,22 +2495,21 @@ def manage_repo():
24952495

24962496

24972497
# main
2498-
cur_dir = Path.cwd()
2499-
tmp_dir = cur_dir / "variants"
2500-
root_dir = cur_dir.parents[1]
2498+
tmp_dir = script_path / "variants"
2499+
root_dir = script_path.parents[1]
25012500
system_path = root_dir / "system"
2502-
templates_dir = cur_dir / "templates"
2501+
templates_dir = script_path / "templates"
25032502
mcu_family_dir = ""
25042503
filtered_family = ""
25052504
# filtered_mcu_file = ""
25062505
periph_c_filename = "PeripheralPins.c"
25072506
pinvar_h_filename = "PinNamesVar.h"
2508-
config_filename = Path("variant_config.json")
2507+
config_filename = script_path / "variant_config.json"
25092508
variant_h_filename = "variant_generic.h"
25102509
variant_cpp_filename = "variant_generic.cpp"
25112510
boards_entry_filename = "boards_entry.txt"
25122511
generic_clock_filename = "generic_clock.c"
2513-
repo_local_path = cur_dir / "repo"
2512+
repo_local_path = script_path / "repo"
25142513
cubemxdir = Path()
25152514
gh_url = "https://github.com/STMicroelectronics/STM32_open_pin_data"
25162515
repo_name = gh_url.rsplit("/", 1)[-1]

0 commit comments

Comments
 (0)