pub struct InstallScriptConfig {
pub id: Option<String>,
pub filename: Option<String>,
pub binaries: Option<Vec<String>>,
pub repo: Option<String>,
pub base_url: Option<String>,
pub verify_checksum: Option<bool>,
pub install_dir: Option<String>,
pub name: Option<String>,
pub description: Option<String>,
pub homepage: Option<String>,
pub skip: Option<StringOrBool>,
}Expand description
curl | sh installer-script configuration.
Drives the install-script stage, which emits a deterministic POSIX
install.sh as a release asset. At run time the script detects the host
OS + architecture, maps it to the matching release archive, downloads and
sha256-verifies it, extracts the binary, and installs it into an install
directory (falling back to $HOME/.local/bin when the primary directory is
not writable and no sudo is available).
Every field is optional: the repository slug is derived from the git
origin remote, the installed binary names from the project name, the
per-platform asset names from the release’s configured targets (via the
same engine SSOT that keeps cargo-binstall pkg_url from 404ing), and the
checksums filename and tag prefix from the flagship crate that builds the
project binary — so a bare install_scripts: {} produces a fully working
installer with no required input.
Fields§
§id: Option<String>Unique identifier for this install-script config (default: “default”).
filename: Option<String>Output filename (default: install.sh).
binaries: Option<Vec<String>>Binary names to install out of the extracted archive (default: a single-element list of the project name). Every name is installed, so an archive shipping multiple binaries lands them all.
repo: Option<String>GitHub owner/name slug the script downloads releases from
(default: derived from the git origin remote).
base_url: Option<String>Base URL the script downloads releases from and queries the REST API
against (default: https://github.com). Point this at a GitHub
Enterprise host to install from a self-hosted GitHub; the script
derives the API base as <base_url>/api/v3 for any non-github.com
host.
verify_checksum: Option<bool>Whether the script verifies each download’s sha256 checksum before
installing (default: true). Set false only for repos that publish
no checksums file or .sha256 sidecars.
install_dir: Option<String>Directory the binary is installed into (default: /usr/local/bin).
The generated script falls back to $HOME/.local/bin when this
directory is not writable and no sudo is available.
name: Option<String>Human-readable name rendered into the script’s header banner (default: the project name).
description: Option<String>One-line description rendered into the script’s header banner.
homepage: Option<String>Project homepage URL rendered into the script’s header banner.
skip: Option<StringOrBool>Skip this config. Accepts bool or template string.
Accepts the legacy disable: spelling via serde alias for back-compat
with imported configs.
Trait Implementations§
Source§impl Clone for InstallScriptConfig
impl Clone for InstallScriptConfig
Source§fn clone(&self) -> InstallScriptConfig
fn clone(&self) -> InstallScriptConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InstallScriptConfig
impl Debug for InstallScriptConfig
Source§impl Default for InstallScriptConfig
impl Default for InstallScriptConfig
Source§fn default() -> InstallScriptConfig
fn default() -> InstallScriptConfig
Source§impl<'de> Deserialize<'de> for InstallScriptConfigwhere
InstallScriptConfig: Default,
impl<'de> Deserialize<'de> for InstallScriptConfigwhere
InstallScriptConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for InstallScriptConfig
impl JsonSchema for InstallScriptConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more