Skip to main content

HomebrewCaskConfig

Struct HomebrewCaskConfig 

Source
pub struct HomebrewCaskConfig {
Show 33 fields pub name: Option<String>, pub alternative_names: Option<Vec<String>>, pub repository: Option<RepositoryConfig>, pub commit_author: Option<CommitAuthorConfig>, pub commit_msg_template: Option<String>, pub directory: Option<String>, pub ids: Option<Vec<String>>, pub url_template: Option<String>, pub url: Option<HomebrewCaskURL>, pub app: Option<String>, pub binaries: Option<Vec<HomebrewCaskBinary>>, pub legacy_binary: Option<String>, pub description: Option<String>, pub homepage: Option<String>, pub license: Option<String>, pub caveats: Option<String>, pub custom_block: Option<String>, pub service: Option<String>, pub livecheck: Option<HomebrewLivecheck>, pub manpages: Option<Vec<String>>, pub legacy_manpage: Option<String>, pub completions: Option<HomebrewCaskCompletions>, pub generate_completions_from_executable: Option<HomebrewCaskGeneratedCompletions>, pub dependencies: Option<Vec<HomebrewCaskDependencyEntry>>, pub conflicts: Option<Vec<HomebrewCaskConflictEntry>>, pub hooks: Option<HomebrewCaskHooks>, pub uninstall: Option<HomebrewCaskUninstall>, pub zap: Option<HomebrewCaskUninstall>, pub skip_upload: Option<StringOrBool>, pub update_existing_pr: Option<StringOrBool>, pub required: Option<bool>, pub if_condition: Option<String>, pub retain_on_rollback: Option<bool>,
}
Expand description

Unified Homebrew Cask configuration.

Used at both call-sites:

  • homebrew_casks: — top-level array; carries repository, commit_author, directory, ids, url, structured uninstall/zap, etc.
  • crates[].publish.homebrew_cask: — per-crate override; same shape, with url_template as the simpler URL alternative.

Fields from both original types are present; any field may be None at either call-site. The union avoids a two-type bifurcation while keeping both axes.

Fields§

§name: Option<String>

Cask name (default: crate / project name).

§alternative_names: Option<Vec<String>>

Alternative cask names (aliases).

§repository: Option<RepositoryConfig>

Unified repository config for the Homebrew tap.

§commit_author: Option<CommitAuthorConfig>

Commit author with optional signing.

§commit_msg_template: Option<String>

Custom commit message template. Default: “Brew cask update for {{ ProjectName }} version {{ Tag }}”

§directory: Option<String>

Subdirectory in the tap repo for cask placement (default: “Casks”).

§ids: Option<Vec<String>>

Build IDs filter: only include artifacts from builds whose id is in this list.

§url_template: Option<String>

Simple URL template for the .dmg/.zip download (per-crate shorthand).

Cannot be combined with url.template: — set one or the other. If both are present, config validation rejects the config at parse time. Use url: for the structured form (verified domain, custom headers, etc.) or url_template: for a bare string shorthand — never both simultaneously.

§url: Option<HomebrewCaskURL>

Structured download URL configuration (top-level axis).

§app: Option<String>

macOS .app bundle name (e.g. “MyApp.app”).

§binaries: Option<Vec<HomebrewCaskBinary>>

Binary stubs to create in /usr/local/bin.

Each entry is either a bare string ("my-cli" → emits binary "my-cli") or a structured { name, target } object ({ name: "my-cli", target: "mycli" } → emits binary "my-cli", target: "mycli"). The target: form mirrors the Homebrew Ruby cask DSL for binary renames — without it, a wrapped binary installs at the wrong path. Cask binary entry.

§legacy_binary: Option<String>

Deprecated singular spelling of Self::binaries. The upstream replaced binary: foo with binaries: [foo]; this field captures the legacy spelling so imported configs keep parsing. apply_homebrew_cask_legacy_singulars folds the value into Self::binaries at config-load time and emits a one-time deprecation warning per occurrence. The field is excluded from serialization so a round-tripped config emits only the canonical plural form.

§description: Option<String>

Cask description.

§homepage: Option<String>

Project homepage URL.

§license: Option<String>

License identifier (SPDX).

§caveats: Option<String>

Custom caveats shown after install.

§custom_block: Option<String>

Arbitrary Ruby code inserted into the cask block.

§service: Option<String>

Homebrew service definition.

§livecheck: Option<HomebrewLivecheck>

livecheck stanza configuration for the cask. When unset, the cask emits livecheck do\n skip "Auto-generated on release."\nend (a binary cask’s download URL/sha256 are rewritten on every release, so brew livecheck has nothing stable to poll). Set strategy: / url: / regex: (with skip: false) to opt into active version detection — the same shape a Homebrew cask livecheck do … end block accepts. Reuses the formula livecheck config type.

§manpages: Option<Vec<String>>

Manual page references to install.

§legacy_manpage: Option<String>

Deprecated singular spelling of Self::manpages. The upstream replaced manpage: foo.1 with manpages: [foo.1]; this field captures the legacy spelling so imported configs keep parsing. apply_homebrew_cask_legacy_singulars folds the value into Self::manpages at config-load time and emits a one-time deprecation warning per occurrence. The field is excluded from serialization so a round-tripped config emits only the canonical plural form.

§completions: Option<HomebrewCaskCompletions>

Shell completion definitions.

§generate_completions_from_executable: Option<HomebrewCaskGeneratedCompletions>

Auto-generate shell completions from an executable.

§dependencies: Option<Vec<HomebrewCaskDependencyEntry>>

Cask dependencies (other casks or formulae).

§conflicts: Option<Vec<HomebrewCaskConflictEntry>>

Conflicting casks or formulae.

§hooks: Option<HomebrewCaskHooks>

Pre/post install/uninstall hooks.

§uninstall: Option<HomebrewCaskUninstall>

Structured uninstall stanza configuration.

§zap: Option<HomebrewCaskUninstall>

Deep uninstall (zap) stanza configuration.

§skip_upload: Option<StringOrBool>

Skip publishing the cask. "true" always skips; "auto" skips for prerelease versions. Accepts bool or template string.

§update_existing_pr: Option<StringOrBool>

When true, force-push the updated cask file to the existing PR branch when a PR for the same head branch already exists. The PR content is updated in place rather than creating a duplicate. When false (default), the push is skipped and a warning is emitted so the operator sees that the publisher did not update the PR.

§required: Option<bool>

Override whether this publisher failing should fail the overall release.

Default: false — a failure here is logged but does not abort the release. Set to true to fail the release on any error.

§if_condition: Option<String>

Template-conditional gate: when the rendered result is falsy ("false" / "0" / "no" / empty), the Homebrew Cask config is skipped. Render failure hard-errors. Config key: homebrew_casks[].if:.

§retain_on_rollback: Option<bool>

When true, a triggered rollback leaves this publisher’s work in place rather than attempting to undo it. Default false.

Trait Implementations§

Source§

impl Clone for HomebrewCaskConfig

Source§

fn clone(&self) -> HomebrewCaskConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HomebrewCaskConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for HomebrewCaskConfig

Source§

fn default() -> HomebrewCaskConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for HomebrewCaskConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for HomebrewCaskConfig

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl PublisherGateOverrides for HomebrewCaskConfig

Source§

fn required_override(&self) -> Option<bool>

Config-level required: override. None keeps the publisher’s built-in default; Some(true) anywhere escalates the release gate.
Source§

fn retain_on_rollback_override(&self) -> Option<bool>

Config-level retain_on_rollback: override. Some(true) anywhere opts the publisher’s successful work out of rollback.
Source§

impl Serialize for HomebrewCaskConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more