mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-21 21:52:11 +00:00
fix regex to populate dll version information correctly
This commit is contained in:
parent
c69194ec4c
commit
93569bf0f4
1 changed files with 6 additions and 7 deletions
|
|
@ -396,12 +396,11 @@ def generate_build_tree(cmake_path, source_dir, build_dir, cuda_home, cudnn_home
|
|||
build_number = os.getenv('Build_BuildNumber')
|
||||
source_version = os.getenv('Build_SourceVersion')
|
||||
if build_number and source_version:
|
||||
build_matches = re.match(r"^(\d\d)(\d\d)(\d\d)-(\d\d)(\d\d)\.(\d)\.(\S+)$", build_number)
|
||||
build_matches = re.fullmatch(r"(\d\d)(\d\d)(\d\d)(\d\d)\.(\d+)", build_number)
|
||||
if build_matches:
|
||||
YY = build_matches.group(1)
|
||||
MM = build_matches.group(2)
|
||||
DD = build_matches.group(3)
|
||||
HH = build_matches.group(4)
|
||||
YY = build_matches.group(2)
|
||||
MM = build_matches.group(3)
|
||||
DD = build_matches.group(4)
|
||||
|
||||
# Get ORT major and minor number
|
||||
with open(os.path.join(source_dir, 'VERSION_NUMBER')) as f:
|
||||
|
|
@ -419,8 +418,8 @@ def generate_build_tree(cmake_path, source_dir, build_dir, cuda_home, cudnn_home
|
|||
# String = 191101-2300.1.master.0bce7ae
|
||||
cmake_args += ["-DVERSION_MAJOR_PART={}".format(ort_major),
|
||||
"-DVERSION_MINOR_PART={}".format(ort_minor),
|
||||
"-DVERSION_BUILD_PART={}{}".format(YY, MM),
|
||||
"-DVERSION_PRIVATE_PART={}{}".format(DD, HH),
|
||||
"-DVERSION_BUILD_PART={}".format(YY),
|
||||
"-DVERSION_PRIVATE_PART={}{}".format(MM, DD),
|
||||
"-DVERSION_STRING={}.{}.{}.{}".format(ort_major, ort_minor, build_number, source_version[0:7])]
|
||||
|
||||
for config in configs:
|
||||
|
|
|
|||
Loading…
Reference in a new issue