fix: 更新包过大时分段上传并自动拼回

This commit is contained in:
Nixevol
2026-10-29 07:40:41 +08:00
parent 623c7c28e9
commit 7ffbf48efd
3 changed files with 161 additions and 25 deletions
+14 -1
View File
@@ -24,7 +24,20 @@ def test_release_needs_the_package_asset() -> None:
assert found is not None
assert found["latest"] == "0.1.1"
assert "http" not in found["notes"]
assert found["url"].endswith(".zip")
assert found["urls"] == ["https://example.com/app.zip"]
parts = describe_release(
{
"tag_name": "v0.1.2",
"body": "",
"assets": [
{"name": "VideosDownTools-windows-x64.zip.part002", "browser_download_url": "https://example.com/b"},
{"name": "VideosDownTools-windows-x64.zip.part001", "browser_download_url": "https://example.com/a"},
],
},
current,
)
assert parts is not None
assert parts["urls"] == ["https://example.com/a", "https://example.com/b"]
assert describe_release({"tag_name": "v0.1.0", "assets": [{"name": "VideosDownTools-windows-x64.zip", "browser_download_url": "https://example.com/app.zip"}]}, current) is None