Skip to content
Snippets Groups Projects
Commit 2c0cab78 authored by David Schäfer's avatar David Schäfer
Browse files

dmpflagger: added option to not include the repo commit hash

parent 4e1fbc37
No related branches found
No related tags found
2 merge requests!193Release 1.4,!188Release 1.4
Pipeline #9343 passed with stages
in 9 minutes and 2 seconds
......@@ -36,13 +36,13 @@ FLAGS = ["NIL", "OK", "DOUBTFUL", "BAD"]
class DmpFlagger(CategoricalFlagger):
def __init__(self):
def __init__(self, include_version=True):
super().__init__(FLAGS)
self.flags_fields = [FlagFields.FLAG, FlagFields.CAUSE, FlagFields.COMMENT]
version = subprocess.run(
"git describe --tags --always --dirty", shell=True, check=False, stdout=subprocess.PIPE,
).stdout
self.project_version = version.decode().strip()
self.project_version = version.decode().strip() if include_version else ""
self.signature = ("flag", "comment", "cause", "force")
self._flags = None
self._causes = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment