From 4d5d9ae645954166e8d3649381a37547a3729f95 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Thu, 27 May 2021 09:21:13 +0100 Subject: [PATCH] config: appversion: Use `+DIRTY` to ensure SemVer compliance. It's also more succinct. We know what it means. --- config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index fb644a73..d958aad8 100644 --- a/config.py +++ b/config.py @@ -96,7 +96,7 @@ def git_shorthash_from_head() -> str: """ Determine short hash for current git HEAD. - Includes -DIRTY if any changes have been made from HEAD + Includes +DIRTY if any changes have been made from HEAD :return: str - None if we couldn't determine the short hash. """ @@ -122,7 +122,7 @@ def git_shorthash_from_head() -> str: with contextlib.suppress(Exception): result = subprocess.run('git diff --stat HEAD'.split(), capture_output=True) if len(result.stdout) > 0: - shorthash += '-WORKING-DIR-IS-DIRTY' + shorthash += '+DIRTY' if len(result.stderr) > 0: logger.warning(f'Data from git on stderr:\n{str(result.stderr)}')