Skip to main content

Module version

Module version 

Source
Expand description

doiget version [--check] — print the current version and optionally query GitHub Releases for the latest stable tag.

Without --check the command prints the compiled-in version string and exits immediately (no network, no side-effects).

With --check it queries the GitHub Releases API, compares with the compiled-in version, and emits a machine-readable JSON object:

{
  "current":          "0.4.1-beta.0",
  "latest":           "0.4.0",
  "newer_available":  false,
  "html_url":         "https://github.com/…/releases/tag/v0.4.0"
}

When the check fails (rate-limited, network down) the latest and html_url fields are null and an error key is populated instead, so callers never receive a hard error just because GitHub is slow.

Structs§

VersionCheckResult
Output shape for --check in JSON mode.

Functions§

run
Entry point for doiget version [--check].