Return (archive_filename, binary_name) for the current platform. Raises RuntimeError if the platform is not supported.
()
| 58 | |
| 59 | |
| 60 | def get_asset_info() -> tuple[str, str]: |
| 61 | """Return (archive_filename, binary_name) for the current platform. |
| 62 | |
| 63 | Raises RuntimeError if the platform is not supported. |
| 64 | """ |
| 65 | key = get_platform_key() |
| 66 | |
| 67 | # On Linux, check for musl/Alpine first |
| 68 | if key[0] == "linux" and _is_musl(): |
| 69 | musl_info = _MUSL_ASSETS.get(key[1]) |
| 70 | if musl_info: |
| 71 | return musl_info |
| 72 | |
| 73 | info = PLATFORM_ASSETS.get(key) |
| 74 | if info is None: |
| 75 | raise RuntimeError( |
| 76 | f"Unsupported platform: {key[0]}/{key[1]}. " |
| 77 | f"Supported platforms: {', '.join(f'{p}/{m}' for p, m in PLATFORM_ASSETS)}" |
| 78 | ) |
| 79 | return info |
| 80 | |
| 81 | |
| 82 | def get_download_url(version: str, archive_name: str) -> str: |
no test coverage detected
searching dependent graphs…