diff --git a/scripts/generateWSALinks.py b/scripts/generateWSALinks.py index c702664e37..5286b5ebcf 100644 --- a/scripts/generateWSALinks.py +++ b/scripts/generateWSALinks.py @@ -144,6 +144,13 @@ def send_req(i, v, out_file_name): threads = [] wsa_build_ver = 0 +for filename, values in identities.items(): + if re.match(f"MicrosoftCorporationII\.WindowsSubsystemForAndroid_.*\.msixbundle", filename): + tmp_wsa_build_ver = re.search(u'\d{4}.\d{5}.\d{1,}.\d{1,}', filename).group() + if(wsa_build_ver == 0): + wsa_build_ver = tmp_wsa_build_ver + elif version.parse(wsa_build_ver) < version.parse(tmp_wsa_build_ver): + wsa_build_ver = tmp_wsa_build_ver for filename, values in identities.items(): if re.match(f"Microsoft\.UI\.Xaml\..*_{arch}_.*\.appx", filename): out_file_name = f"{values[1]}_{arch}.appx" @@ -156,13 +163,8 @@ def send_req(i, v, out_file_name): out_file = download_dir / out_file_name elif not skip_wsa_download and re.match(f"MicrosoftCorporationII\.WindowsSubsystemForAndroid_.*\.msixbundle", filename): tmp_wsa_build_ver = re.search(u'\d{4}.\d{5}.\d{1,}.\d{1,}', filename).group() - if(wsa_build_ver == 0): - wsa_build_ver = tmp_wsa_build_ver - else: - if version.parse(wsa_build_ver) < version.parse(tmp_wsa_build_ver): - wsa_build_ver = tmp_wsa_build_ver - else: - continue + if(wsa_build_ver != tmp_wsa_build_ver): + continue version_splitted = wsa_build_ver.split(".") major_ver = version_splitted[0] minor_ver = version_splitted[1]