File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -729,11 +729,14 @@ def get_compiler_version(env):
729729 version = subprocess .check_output (args , encoding = "utf-8" ).strip ()
730730 for line in version .splitlines ():
731731 split = line .split (":" , 1 )
732- if split [0 ] == "catalog_productDisplayVersion" :
733- sem_ver = split [1 ].split ("." )
734- ret ["major" ] = int (sem_ver [0 ])
735- ret ["minor" ] = int (sem_ver [1 ])
736- ret ["patch" ] = int (sem_ver [2 ].split ()[0 ])
732+ if split [0 ] == "catalog_productSemanticVersion" :
733+ match = re .match (r" ([0-9]*).([0-9]*).([0-9]*)-?([a-z0-9.+]*)" , split [1 ])
734+ if match is not None :
735+ ret ["major" ] = int (match .group (1 ))
736+ ret ["minor" ] = int (match .group (2 ))
737+ ret ["patch" ] = int (match .group (3 ))
738+ # Semantic suffix (i.e. insiders+11116.177)
739+ ret ["metadata2" ] = match .group (4 )
737740 # Could potentially add section for determining preview version, but
738741 # that can wait until metadata is actually used for something.
739742 if split [0 ] == "catalog_buildVersion" :
You can’t perform that action at this time.
0 commit comments