-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix sparkle .zip after refactoring #3620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -123,8 +123,8 @@ def _get_sparkle_zip_download_url(release: Dict, version: str, platform: str) -> | |
| """ | ||
| assets = release.get("assets", []) | ||
|
|
||
| # Look for the Sparkle ZIP file: {version}-{platform}.zip | ||
| expected_filename = f"{version}-{platform}.zip" | ||
| # Look for the Sparkle ZIP file: Omi.zip | ||
| expected_filename = f"Omi.zip" | ||
|
|
||
| for asset in assets: | ||
| asset_name = asset.get("name", "") | ||
|
|
@@ -134,7 +134,7 @@ def _get_sparkle_zip_download_url(release: Dict, version: str, platform: str) -> | |
| # Fallback: look for any zip file that matches the pattern | ||
| for asset in assets: | ||
| asset_name = asset.get("name", "") | ||
| if asset_name.endswith(f"-{platform}.zip"): | ||
| if asset_name.endswith(f"Omi.zip"): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This fallback logic also hardcodes the asset name suffix to "Omi.zip", further confirming that the |
||
| return asset.get("browser_download_url") | ||
|
|
||
| return None | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change hardcodes the
expected_filenameto "Omi.zip". Consequently, theversionandplatformparameters passed to_get_sparkle_zip_download_urlare no longer used in constructing this filename. This creates a misleading function signature, as it implies these parameters are still relevant for identifying the Sparkle ZIP file. This can lead to confusion and potential future correctness issues if the asset naming convention changes or if developers assume these parameters are actively used. Consider updating the function signature to remove these unused parameters if they are not needed for any other part of the Sparkle ZIP identification logic.