From 771c47f809eb1e25c2bb3f55ff40780c3709e388 Mon Sep 17 00:00:00 2001 From: hedger Date: Thu, 16 Mar 2023 17:46:18 +0400 Subject: [PATCH] fbt: explicitly set dist suffix length, not depending on environment settings. See (#2497) --- scripts/version.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/version.py b/scripts/version.py index 896b58a4..880a9728 100644 --- a/scripts/version.py +++ b/scripts/version.py @@ -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: