languages: Don't remove old artifacts on download failure (#35967)
Release Notes: - N/A
This commit is contained in:
parent
c82cd0c6b1
commit
8d332da4c5
4 changed files with 35 additions and 33 deletions
|
@ -71,11 +71,19 @@ pub async fn latest_github_release(
|
|||
}
|
||||
};
|
||||
|
||||
releases
|
||||
let mut release = releases
|
||||
.into_iter()
|
||||
.filter(|release| !require_assets || !release.assets.is_empty())
|
||||
.find(|release| release.pre_release == pre_release)
|
||||
.context("finding a prerelease")
|
||||
.context("finding a prerelease")?;
|
||||
release.assets.iter_mut().for_each(|asset| {
|
||||
if let Some(digest) = &mut asset.digest {
|
||||
if let Some(stripped) = digest.strip_prefix("sha256:") {
|
||||
*digest = stripped.to_owned();
|
||||
}
|
||||
}
|
||||
});
|
||||
Ok(release)
|
||||
}
|
||||
|
||||
pub async fn get_release_by_tag_name(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue