fbt: explicitly set dist suffix length, not depending on environment settings. See (#2497)

This commit is contained in:
hedger 2023-03-16 17:46:18 +04:00 committed by GitHub
parent 6aa0c08f3a
commit 771c47f809
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,11 +9,16 @@ from datetime import date, datetime
class GitVersion:
REVISION_SUFFIX_LENGTH = 8
def __init__(self, source_dir):
self.source_dir = source_dir
def get_version_info(self):
commit = self._exec_git("rev-parse --short HEAD") or "unknown"
commit = (
self._exec_git(f"rev-parse --short={self.REVISION_SUFFIX_LENGTH} HEAD")
or "unknown"
)
dirty = False
try: