Merge pull request 'API: hw_generate commit generated config' (#1957) from hsjobeki/clan-core:hsjobeki-main into main
This commit is contained in:
@@ -7,6 +7,7 @@ from pathlib import Path
|
|||||||
from clan_cli.api import API
|
from clan_cli.api import API
|
||||||
from clan_cli.clan_uri import FlakeId
|
from clan_cli.clan_uri import FlakeId
|
||||||
from clan_cli.errors import ClanError
|
from clan_cli.errors import ClanError
|
||||||
|
from clan_cli.git import commit_file
|
||||||
|
|
||||||
from ..cmd import run, run_no_stdout
|
from ..cmd import run, run_no_stdout
|
||||||
from ..completions import add_dynamic_completer, complete_machines
|
from ..completions import add_dynamic_completer, complete_machines
|
||||||
@@ -161,6 +162,11 @@ def generate_machine_hardware_info(
|
|||||||
print(f"Successfully generated: {hw_file}")
|
print(f"Successfully generated: {hw_file}")
|
||||||
|
|
||||||
system = show_machine_hardware_platform(clan_dir, machine_name)
|
system = show_machine_hardware_platform(clan_dir, machine_name)
|
||||||
|
|
||||||
|
commit_file(
|
||||||
|
hw_file, clan_dir.path, f"Generate hardware configuration for {machine_name}"
|
||||||
|
)
|
||||||
|
|
||||||
return HardwareInfo(system)
|
return HardwareInfo(system)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user