add ui description helper to build_metadata (#32113)

add ui_description
This commit is contained in:
Justin Newberry 2024-04-05 19:28:21 -04:00 committed by GitHub
parent 8be1a0ea36
commit c95404d564
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -108,6 +108,10 @@ class BuildMetadata:
def canonical(self) -> str:
return f"{self.openpilot.version}-{self.openpilot.git_commit}-{self.openpilot.build_style}"
@property
def ui_description(self) -> str:
return f"{self.openpilot.version} / {self.openpilot.git_commit[:6]} / {self.channel}"
def build_metadata_from_dict(build_metadata: dict) -> BuildMetadata:
channel = build_metadata.get("channel", "unknown")