Skip to main content

Crate codewhale_release

Crate codewhale_release 

Source

Re-exports§

pub use check::SuppressionReason;
pub use check::UpdateCheckCache;
pub use check::suppression_reason;
pub use install::InstallMethod;
pub use install::current_install_method;

Modules§

check
Throttling and suppression for background “is there a newer release?” checks.
install
How this binary was installed, and therefore which command updates it.
tls
Process-wide TLS bootstrap plus the platform HTTP client constructors that depend on it. Every reqwest client Codewhale builds goes through here so the rustls crypto provider is installed exactly once, before the first client, on every path (TUI, CLI, tests).

Enums§

ReleaseChannel
The release channel to query for updates.
ReleaseQuery
Describes where to fetch release metadata from.

Constants§

CHECKSUM_MANIFEST_ASSET
Filename of the SHA-256 checksum manifest included in every release.
CNB_MIRROR_ENV
Environment variable that, when set, enables the CNB mirror for downloads.
CNB_REPO_URL
Base URL of the CodeWhale repository on the CNB mirror platform.
DEEPSEEK_RELEASE_BASE_URL_ENV
Legacy environment variable (alias for RELEASE_BASE_URL_ENV).
LATEST_RELEASE_URL
GitHub API URL for the single latest stable release.
LEGACY_RELEASE_BASE_URL_ENV
Legacy environment variable (alias for RELEASE_BASE_URL_ENV).
LEGACY_UPDATE_VERSION_ENV
Legacy environment variable (alias for UPDATE_VERSION_ENV).
RELEASES_URL
GitHub API URL listing recent releases (up to 100), used to find beta tags.
RELEASE_BASE_URL_ENV
Environment variable that overrides the base URL for release asset downloads.
UPDATE_USER_AGENT
User-Agent header sent with release metadata requests.
UPDATE_VERSION_ENV
Environment variable that pins the update target version.

Functions§

cnb_release_base_url
Constructs the CNB mirror asset URL for a given version tag.
compare_release_versions
Compares a current version string against a release tag using semver ordering. Both v prefixes and trailing build metadata (e.g. (abc123)) are stripped before comparison.
fetch_release_json_async
Async counterpart of fetch_release_json_blocking.
fetch_release_json_blocking
Fetches a release JSON payload from url using a blocking HTTP client.
is_beta_tag
Returns true if the tag name contains "beta" (case-insensitive).
latest_beta_tag_from_release_list_json
Scans a GitHub release-list JSON response and returns the tag of the first entry whose name contains "beta".
latest_release_tag_async
Async helper that resolves the latest release tag for the given channel.
latest_release_tag_blocking
Blocking counterpart of latest_release_tag_async.
latest_tag_from_release_json
Extracts the tag_name field from a GitHub single-release JSON response.
mirror_asset_url
Joins a mirror base URL with an asset filename to produce a full download URL.
parse_release_version
Parses a version string (with optional v prefix and trailing build info) into a semver::Version.
platform_blocking_http_client_builder
Blocking counterpart of platform_http_client_builder.
platform_http_client_builder
Build a reqwest client builder with the TLS roots appropriate for the current platform.
release_base_url_from_env
Reads the release base URL from environment variables, falling back to the CNB mirror if CODEWHALE_USE_CNB_MIRROR is set. Returns None when no override is configured.
resolve_release_query
Determines the appropriate ReleaseQuery for the given channel, taking environment-variable overrides (mirror URL, pinned version) into account.
update_is_needed
Determines whether an update is needed for the given channel.
update_network_fallback_hint
Returns a human-readable hint explaining how to use a mirror when GitHub downloads are blocked or slow (e.g. on mainland China networks).
update_version_from_env
Returns the pinned update version from environment variables, or None if neither DEEPSEEK_TUI_VERSION nor DEEPSEEK_VERSION is set.