Move source repos under dev/edu
This commit is contained in:
+5
-2
@@ -37,6 +37,7 @@ class GitConfig:
|
||||
class WorkspaceConfig:
|
||||
config_path: Path
|
||||
original_root: Path
|
||||
original_series_root: Path
|
||||
workspace_root: Path
|
||||
series_root: Path
|
||||
socket_root: Path
|
||||
@@ -51,8 +52,9 @@ def load_config(config_path: Path) -> WorkspaceConfig:
|
||||
raw = json.loads(config_path.read_text(encoding="utf-8"))
|
||||
base_dir = config_path.parent
|
||||
|
||||
original_root = expand_path(raw.get("original_root", "~/dev/rv/repos"), base_dir)
|
||||
original_root = expand_path(raw.get("original_root", "~/dev/edu/repos/rv"), base_dir)
|
||||
workspace_root = expand_path(raw.get("workspace_root", "~/dev/workspace/rv"), base_dir)
|
||||
original_series_root = expand_path(raw.get("original_series_root", str(original_root / "series")), base_dir)
|
||||
series_root = expand_path(raw.get("series_root", str(workspace_root / "series")), base_dir)
|
||||
socket_root = expand_path(raw.get("socket_root", str(workspace_root / "sockets")), base_dir)
|
||||
token_path = expand_path(raw.get("token_file", str(workspace_root / "tokens" / "tokens.json")), base_dir)
|
||||
@@ -62,7 +64,6 @@ def load_config(config_path: Path) -> WorkspaceConfig:
|
||||
candidate_values = [
|
||||
raw.get("tools_root", str(workspace_root / "tools" / "rv32i-hazard3-env")),
|
||||
str(original_root / "rv32i-hazard3-env"),
|
||||
"~/dev/rv/tools/rv32i-hazard3-env",
|
||||
]
|
||||
tools_root_candidates = [expand_path(value, base_dir) for value in candidate_values]
|
||||
|
||||
@@ -82,6 +83,7 @@ def load_config(config_path: Path) -> WorkspaceConfig:
|
||||
return WorkspaceConfig(
|
||||
config_path=config_path,
|
||||
original_root=original_root,
|
||||
original_series_root=original_series_root,
|
||||
workspace_root=workspace_root,
|
||||
series_root=series_root,
|
||||
socket_root=socket_root,
|
||||
@@ -1006,6 +1008,7 @@ def run_tmux_container(config: WorkspaceConfig, args: argparse.Namespace) -> Non
|
||||
def print_config(config: WorkspaceConfig) -> None:
|
||||
print(f"config_path\t{config.config_path}")
|
||||
print(f"original_root\t{config.original_root}")
|
||||
print(f"original_series_root\t{config.original_series_root}")
|
||||
print(f"workspace_root\t{config.workspace_root}")
|
||||
print(f"series_root\t{config.series_root}")
|
||||
print(f"socket_root\t{config.socket_root}")
|
||||
|
||||
Reference in New Issue
Block a user