mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 05:17:13 +02:00
updatet regex pattern to support postfix
This commit is contained in:
@ -17,8 +17,8 @@ def get_version():
|
||||
version = sys.argv[1]
|
||||
|
||||
# Validate that the version argument matches semantic versioning format (X.Y.Z)
|
||||
if not re.match(r'^\d+\.\d+\.\d+$', version):
|
||||
print("Error: Version argument must be in semantic versioning format (X.Y.Z)")
|
||||
if not re.match(r'^\d+\.\d+\.\d+(?:[\-\.][\.\w\-]+)?+$', version):
|
||||
print("Error: Version argument must be in semantic versioning format (X.Y.Z[./-][postfix])")
|
||||
sys.exit(1)
|
||||
|
||||
return version
|
||||
|
Reference in New Issue
Block a user