mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
feat(configure): support for loading only a subset of the projects
specified by the `TT_ONLY_PROJECTS` environment variable, e.g.: ```bash TT_ONLY_PROJECTS="tt_um_chip_rom,tt_um_factory_test" ```
This commit is contained in:
+8
-1
@@ -31,6 +31,10 @@ class Projects:
|
|||||||
if not os.path.exists(self.project_dir):
|
if not os.path.exists(self.project_dir):
|
||||||
os.makedirs(self.project_dir)
|
os.makedirs(self.project_dir)
|
||||||
|
|
||||||
|
only_projects = os.getenv("TT_ONLY_PROJECTS")
|
||||||
|
if only_projects:
|
||||||
|
only_projects = only_projects.split(",")
|
||||||
|
|
||||||
self.projects: List[Project] = []
|
self.projects: List[Project] = []
|
||||||
project_list = [
|
project_list = [
|
||||||
entry
|
entry
|
||||||
@@ -47,7 +51,7 @@ class Projects:
|
|||||||
|
|
||||||
commit_id_file = os.path.join(project_dir, "commit_id.json")
|
commit_id_file = os.path.join(project_dir, "commit_id.json")
|
||||||
if not os.path.exists(commit_id_file):
|
if not os.path.exists(commit_id_file):
|
||||||
logging.warning(f"no commit_id.json in {project_dir}, skipping")
|
logging.warning(f"no commit_id.json in {project_dir}, skippinggi")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
commit_id_data = json.load(open(commit_id_file))
|
commit_id_data = json.load(open(commit_id_file))
|
||||||
@@ -55,6 +59,9 @@ class Projects:
|
|||||||
logging.warning(f"skipping {project_dir} (skip flag set)")
|
logging.warning(f"skipping {project_dir} (skip flag set)")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if only_projects and project_id not in only_projects:
|
||||||
|
continue
|
||||||
|
|
||||||
project = Project(
|
project = Project(
|
||||||
index,
|
index,
|
||||||
commit_id_data["repo"],
|
commit_id_data["repo"],
|
||||||
|
|||||||
Reference in New Issue
Block a user