fix indent
This commit is contained in:
parent
ce41933381
commit
7f7c75e983
@ -44,37 +44,37 @@ exportFormat = args.exportFormat
|
||||
r = re.compile(r'^(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$')
|
||||
|
||||
if verbose:
|
||||
print("Version to validate: {}".format(versionToValidate))
|
||||
print("Version to validate: {}".format(versionToValidate))
|
||||
|
||||
m = r.match(versionToValidate)
|
||||
|
||||
if m:
|
||||
if verbose:
|
||||
for i in r.groupindex:
|
||||
print("Found: {}: {}".format(i, m.group(i)))
|
||||
if validateMessage:
|
||||
if verbose:
|
||||
print("Checking message {}".format(messageToValidate))
|
||||
if messageToValidate == '':
|
||||
if verbose:
|
||||
print("Message shall be validate and is invalid")
|
||||
sys.exit(1)
|
||||
else:
|
||||
if printExports:
|
||||
if exportFormat == "bash":
|
||||
print("export MESSAGE={}".format(messageToValidate))
|
||||
elif exportFormat == "powershell":
|
||||
print("set MESSAGE {}".format(messageToValidate))
|
||||
for i in r.groupindex:
|
||||
print("Found: {}: {}".format(i, m.group(i)))
|
||||
if validateMessage:
|
||||
if verbose:
|
||||
print("Checking message {}".format(messageToValidate))
|
||||
if messageToValidate == '':
|
||||
if verbose:
|
||||
print("Message shall be validate and is invalid")
|
||||
sys.exit(1)
|
||||
else:
|
||||
if printExports:
|
||||
if exportFormat == "bash":
|
||||
print("export MESSAGE={}".format(messageToValidate))
|
||||
elif exportFormat == "powershell":
|
||||
print("set MESSAGE {}".format(messageToValidate))
|
||||
|
||||
if printExports:
|
||||
for i in r.groupindex:
|
||||
if exportFormat == "bash":
|
||||
print("export {}={}".format(i.upper(), '' if m.group(i) is None else m.group(i)))
|
||||
elif exportFormat == "powershell":
|
||||
print("set {} {}".format(i.upper(), '""' if m.group(i) is None else m.group(i)))
|
||||
if printExports:
|
||||
for i in r.groupindex:
|
||||
if exportFormat == "bash":
|
||||
print("export {}={}".format(i.upper(), '' if m.group(i) is None else m.group(i)))
|
||||
elif exportFormat == "powershell":
|
||||
print("set {} {}".format(i.upper(), '""' if m.group(i) is None else m.group(i)))
|
||||
|
||||
sys.exit(0)
|
||||
sys.exit(0)
|
||||
else:
|
||||
if verbose:
|
||||
print("Version is invalid")
|
||||
sys.exit(1)
|
||||
if verbose:
|
||||
print("Version is invalid")
|
||||
sys.exit(1)
|
||||
|
Reference in New Issue
Block a user