@@ -81,7 +81,6 @@ def run_cmd(
8181
8282# Update this list when new release managers are added.
8383release_to_sigstore_identity_and_oidc_issuer = {
84- "3.8" : (
"[email protected] " ,
github_oidc_provider ),
8584 "3.9" : (
"[email protected] " ,
github_oidc_provider ),
8685 "3.10" : (
"[email protected] " ,
google_oidc_provider ),
8786 "3.11" : (
"[email protected] " ,
google_oidc_provider ),
@@ -91,10 +90,19 @@ def run_cmd(
9190}
9291
9392
93+ def macos_universal2_description (version : tuple [int , int , int ]) -> str :
94+ if version >= (3 , 14 ):
95+ return "for macOS 10.15 and later"
96+ elif version >= (3 , 12 , 6 ):
97+ return "for macOS 10.13 and later"
98+ else :
99+ return "for macOS 10.9 and later"
100+
101+
94102def get_file_descriptions (
95103 release : str ,
96104) -> list [tuple [re .Pattern [str ], tuple [str , str , bool , str ]]]:
97- v = minor_version_tuple (release )
105+ v = base_version_tuple (release )
98106 rx = re .compile
99107 # value is (file "name", OS slug, download button, file "description").
100108 # OS=None means no ReleaseFile object. Only one matching *file* (not regex)
@@ -125,13 +133,13 @@ def get_file_descriptions(
125133 ),
126134 (
127135 rx (r"-amd64\.exe$" ),
128- ("Windows installer (64-bit)" , "windows" , v >= ( 3 , 9 ) , "Recommended" ),
136+ ("Windows installer (64-bit)" , "windows" , True , "Recommended" ),
129137 ),
130138 (
131139 rx (r"-embed-win32\.zip$" ),
132140 ("Windows embeddable package (32-bit)" , "windows" , False , "" ),
133141 ),
134- (rx (r"\.exe$" ), ("Windows installer (32-bit)" , "windows" , v < ( 3 , 9 ) , "" )),
142+ (rx (r"\.exe$" ), ("Windows installer (32-bit)" , "windows" , False , "" )),
135143 (
136144 rx (r"-macosx10\.5(_rev\d)?\.(dm|pk)g$" ),
137145 (
@@ -165,7 +173,7 @@ def get_file_descriptions(
165173 "macOS 64-bit universal2 installer" ,
166174 "macos" ,
167175 True ,
168- f"for macOS { '10.13' if v >= ( 3 , 12 , 6 ) else '10.9' } and later" ,
176+ macos_universal2_description ( v ) ,
169177 ),
170178 ),
171179 (
@@ -211,6 +219,12 @@ def base_version(release: str) -> str:
211219 return "." .join (m .groups ()[:3 ])
212220
213221
222+ def base_version_tuple (release : str ) -> tuple [int , int , int ]:
223+ m = tag_cre .match (release )
224+ assert m is not None , f"Invalid release: { release } "
225+ return int (m .groups ()[0 ]), int (m .groups ()[1 ]), int (m .groups ()[2 ])
226+
227+
214228def minor_version (release : str ) -> str :
215229 m = tag_cre .match (release )
216230 assert m is not None , f"Invalid release: { release } "
0 commit comments