diff options
author | Sebastien Blaisot <sebastien@blaisot.org> | 2016-01-19 22:38:36 +0100 |
---|---|---|
committer | Sebastien Blaisot <sebastien@blaisot.org> | 2016-01-19 22:38:36 +0100 |
commit | 4cb683a11a49fcb688c93574afb44ec2208d79ee (patch) | |
tree | 59b200e749acacf0ad304826cc47cafa3d9af19e /build/util.py | |
parent | c5f656657879fba2182c029d60a8e05257275077 (diff) |
enforce version format in scons
Diffstat (limited to 'build/util.py')
-rw-r--r-- | build/util.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/build/util.py b/build/util.py index d6ec81fa2d..75b1e27e9b 100644 --- a/build/util.py +++ b/build/util.py @@ -120,6 +120,14 @@ def get_mixxx_version(): raise ValueError("Version not found") version = version.split()[-1].replace('"', '') + + # Check if version respect constraints + # 3 numbers separated by a dot, then maybe a (dash or tilde) and some string + # See src/defs_version.h comment + versionMask = '^\d+\.\d+\.\d+([-~].+)?$' + if not re.match(versionMask, version): + raise ValueError("Version format mismatch. See src/defs_version.h comment") + return version |