This document defines the expected behavior of the CLI.
- Generate a Tauri-compatible
latest.jsonfrom built installer artifacts. - Support multi-platform output in one file.
- Work as a standalone CLI binary.
- Version resolution
- Prefer
package.jsonversionwhen present and valid. - Fallback to
Cargo.toml[package].versionwhenpackage.jsonis absent. - Return an error when neither source yields a version.
- Installer detection
- Detect installers recursively under bundle directory for:
.msi,.exe,.dmg,.AppImage,.deb,.rpm,.tar.gz
- Return an error when no installers are found.
- Platform mapping
- Map
.msiand.exetowindows-x86_64. - Map
.dmgto:darwin-aarch64when filename includesaarch64orarm64darwin-x86_64otherwise
- Map
.AppImage,.deb,.rpm,.tar.gzto:linux-aarch64when filename includesaarch64orarm64linux-x86_64otherwise
- Signature behavior
- Require a matching
.sigfor each detected installer platform. - Return an error when a required platform signature is missing.
- Output structure
- Write
latest.jsonto the project current working directory. - Include keys:
version(string)notes(string)pub_date(RFC3339 UTC, seconds precision)platforms(object keyed by platform)
- For each platform, include:
signatureurlusing<download_url_base>/<installer_filename>
- Auto mode behavior
- The default generate command must:
- Detect bundle dir from known candidates.
- Detect
tauri.conf.jsonfrom known candidates. - Read updater public key from
plugins.updater.pubkey.
- Command behavior
help,-h, and--helpprint CLI usage.version,-V, and--versionprint binary name and package version.- Calling the CLI without valid generate args exits with non-zero status and prints help.
- Unit tests in
src/bin/tauri-latest-json.rsverify:- platform mapping variants
- version precedence and fallback
- generated JSON shape and values
- errors on missing installers/signatures
- generate behavior with current working directory
- auto path detection and config usage
- help/version argument parsing
cargo test
cargo test --all-features
cargo check --features verify-signature