Skip to content

Commit 678268e

Browse files
committed
rust: change how uploaded filenames are determined
This prevents false positives on missing install only archives.
1 parent 67f4381 commit 678268e

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

src/github.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -206,17 +206,16 @@ pub async fn command_upload_release_distributions(args: &ArgMatches) -> Result<(
206206
for version in python_versions {
207207
for (triple, release) in RELEASE_TRIPLES.iter() {
208208
for suffix in &release.suffixes {
209-
let extension = if suffix.contains("install_only") {
210-
"tar.gz"
211-
} else {
212-
"tar.zst"
213-
};
214-
215209
wanted_filenames.insert(format!(
216-
"cpython-{}-{}-{}-{}.{}",
217-
version, triple, suffix, datetime, extension
210+
"cpython-{}-{}-{}-{}.tar.zst",
211+
version, triple, suffix, datetime
218212
));
219213
}
214+
215+
wanted_filenames.insert(format!(
216+
"cpython-{}-{}-install_only-{}.tar.gz",
217+
version, triple, datetime
218+
));
220219
}
221220
}
222221

src/release.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub static RELEASE_TRIPLES: Lazy<BTreeMap<&'static str, TripleRelease>> = Lazy::
2424
let mut h = BTreeMap::new();
2525

2626
// macOS.
27-
let macos_suffixes = vec!["debug", "lto", "pgo", "pgo+lto", "install_only"];
27+
let macos_suffixes = vec!["debug", "lto", "pgo", "pgo+lto"];
2828
h.insert(
2929
"aarch64-apple-darwin",
3030
TripleRelease {
@@ -41,7 +41,7 @@ pub static RELEASE_TRIPLES: Lazy<BTreeMap<&'static str, TripleRelease>> = Lazy::
4141
);
4242

4343
// Windows.
44-
let windows_suffixes = vec!["shared-pgo", "static-noopt", "shared-install_only"];
44+
let windows_suffixes = vec!["shared-pgo", "static-noopt"];
4545
h.insert(
4646
"i686-pc-windows-msvc",
4747
TripleRelease {
@@ -58,8 +58,8 @@ pub static RELEASE_TRIPLES: Lazy<BTreeMap<&'static str, TripleRelease>> = Lazy::
5858
);
5959

6060
// Linux.
61-
let linux_suffixes_pgo = vec!["debug", "lto", "pgo", "pgo+lto", "install_only"];
62-
let linux_suffixes_nopgo = vec!["debug", "lto", "noopt", "install_only"];
61+
let linux_suffixes_pgo = vec!["debug", "lto", "pgo", "pgo+lto"];
62+
let linux_suffixes_nopgo = vec!["debug", "lto", "noopt"];
6363

6464
h.insert(
6565
"aarch64-unknown-linux-gnu",

0 commit comments

Comments
 (0)