mirror of
https://github.com/Yuyi-Oak/BlueArchiveToolkit.git
synced 2026-09-19 12:06:40 +08:00
fix(release): 完成官方发布身份与 legacy CAS 归属保护
This commit is contained in:
@@ -2325,8 +2325,16 @@ fn verify_localized_distribution_manifest_at(
|
||||
.ok_or_else(|| {
|
||||
anyhow::anyhow!("localized distribution 缺少 source official manifest")
|
||||
})?;
|
||||
let source_mapping_identity =
|
||||
crate::official_download::official_distribution_mapping_identity(&official_manifest);
|
||||
let official_anchor =
|
||||
crate::official_download::verify_official_distribution_publication_at(
|
||||
official_release_root,
|
||||
&manifest.official_release_id,
|
||||
)
|
||||
.map_err(anyhow::Error::msg)?
|
||||
.ok_or_else(|| {
|
||||
anyhow::anyhow!("localized distribution 缺少 official publication anchor")
|
||||
})?;
|
||||
let source_mapping_identity = official_anchor.mapping_identity.clone();
|
||||
let expected_destination_index =
|
||||
crate::official_download::official_distribution_destination_index(&official_manifest)
|
||||
.map_err(anyhow::Error::msg)?;
|
||||
@@ -4196,6 +4204,11 @@ mod tests {
|
||||
serde_json::to_vec(&official_manifest).unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
crate::official_download::write_official_distribution_publication_anchor_at(
|
||||
&official,
|
||||
"official-v1",
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let manifest = bat_patch::build_patch_manifest(
|
||||
&official,
|
||||
|
||||
Reference in New Issue
Block a user