Skip to content

Commit

Permalink
Merge pull request #238 from WeBankBlockchain/lab-dev
Browse files Browse the repository at this point in the history
fix check version
  • Loading branch information
CodingCattwo authored Sep 2, 2022
2 parents 5395fa8 + cc941d5 commit a538868
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions deploy/comm/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,14 +349,15 @@ def checkVersionUtil(fisco_ver_str,webase_front_ver_str):
log.info("checkVersionUtil webase: {} and fisco version: {}".format(webase_front_ver_str, fisco_ver_str))
fisco_version_int = int(re.findall("\d+", fisco_ver_str)[0]) * 100 + int(re.findall("\d+", fisco_ver_str)[1]) * 10 + int(re.findall("\d+", fisco_ver_str)[2]) * 1
# webase-front version greater or equal with other webase version
# webase_front_version_int = int(re.findall("\d+", webase_front_ver_str)[0]) * 100 + int(re.findall("\d+", webase_front_ver_str)[1]) * 10 + int(re.findall("\d+", webase_front_ver_str)[2]) * 1
webase_front_version_int = int(re.findall("\d+", webase_front_ver_str)[0]) * 100 + int(re.findall("\d+", webase_front_ver_str)[1]) * 10 + int(re.findall("\d+", webase_front_ver_str)[2]) * 1
# log.info("checkVersionUtil int webase: {} and fisco version: {}".format(webase_front_version_int, fisco_version_int))
flag=False
# require if webase = 'lab*'
if not webase_front_ver_str.startswith('lab'):
flag=True
# require if webase = 'lab*', fisco >= 3.0.0
if (webase_front_ver_str.startswith('lab') and fisco_version_int < 300 ):
if (webase_front_ver_str.startswith('lab')):
print ('[Error]Please use webase v3.0 version instead of lab version')
flag=True
if (not webase_front_version_int >= 300 and fisco_version_int >= 300):
print ('[Error]Please use webase v3.0 version with fisco v3.0 official version')
flag=True

# if version conflicts, exit
Expand Down

0 comments on commit a538868

Please sign in to comment.