build scripts: prepare for versions like 11.11.11

This commit is contained in:
Shuai Lin 2019-01-19 11:23:22 +08:00
parent 218e4b53a6
commit 209507a0d8
2 changed files with 2 additions and 2 deletions

View File

@ -400,7 +400,7 @@ def validate_args(usage, options):
# [ version ]
def check_project_version(version):
'''A valid version must be like 1.2.2, 1.3'''
if not re.match(r'^[0-9](\.[0-9]+)+$', version):
if not re.match(r'^[0-9]+(\.[0-9]+)+$', version):
error('%s is not a valid version' % version, usage=usage)
mode = get_option(CONF_MODE).lower()

View File

@ -370,7 +370,7 @@ def validate_args(usage, options):
# [ version ]
def check_project_version(version):
'''A valid version must be like 1.2.2, 1.3'''
if not re.match('^[0-9]+(\.([0-9])+)+$', version):
if not re.match(r'^[0-9]+(\.[0-9]+)+$', version):
error('%s is not a valid version' % version, usage=usage)
version = get_option(CONF_VERSION)