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: