mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
feat: sort projects by sort_id in commit_id.json
Sorting helps preventing projects shifting around as the shuttle fills up. "sort_id" is provided by the tt-app.
This commit is contained in:
@@ -43,6 +43,7 @@ class Projects():
|
|||||||
|
|
||||||
project = Project(index, commit_id_data['repo'], project_dir, args, is_user_project=False)
|
project = Project(index, commit_id_data['repo'], project_dir, args, is_user_project=False)
|
||||||
project.commit_id = commit_id_data['commit']
|
project.commit_id = commit_id_data['commit']
|
||||||
|
project.sort_id = commit_id_data['sort_id']
|
||||||
|
|
||||||
# projects should now be installed, so load all the data from the yaml files
|
# projects should now be installed, so load all the data from the yaml files
|
||||||
# fill projects will load from the fill project's directory
|
# fill projects will load from the fill project's directory
|
||||||
@@ -60,6 +61,8 @@ class Projects():
|
|||||||
|
|
||||||
self.projects.append(project)
|
self.projects.append(project)
|
||||||
|
|
||||||
|
self.projects.sort(key=lambda x: x.sort_id)
|
||||||
|
|
||||||
all_macro_instances = [project.get_macro_instance() for project in self.projects]
|
all_macro_instances = [project.get_macro_instance() for project in self.projects]
|
||||||
self.assert_unique(all_macro_instances)
|
self.assert_unique(all_macro_instances)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user