Expand description
Binary download, hash verification, and cleanup operations for self-update.
This module is responsible for:
- Determining the platform-specific asset name and download URLs
- Computing and verifying SHA256 checksums
- Cleaning up leftover
.oldbinaries from previous updates
Structs§
- Download
Urls - Download URLs for the binary and optional checksum from a GitHub release.
Functions§
- cleanup_
old_ binary - Clean up leftover
.oldbinary from a previous self-update. - compute_
data_ hash - Compute SHA256 hash of in-memory data, returning the lowercase hex string.
- get_
asset_ name - Get the platform-specific asset name for the current OS/architecture.
- get_
binary_ download_ url - Get the download URL for the platform binary from the release API response.
- get_
checksum_ asset_ name - Get the checksum asset name for the current platform.
- get_
download_ urls - Get the download URLs for the platform binary and checksum from the release API response.