Skip to main content

HomebrewCoreConfig

Struct HomebrewCoreConfig 

Source
pub struct HomebrewCoreConfig {
Show 15 fields pub id: Option<String>, pub ids: Option<Vec<String>>, pub name: Option<String>, pub repository: Option<RepositoryConfig>, pub path: Option<String>, pub download_url: Option<String>, pub sha256: Option<String>, pub commit_msg_template: Option<String>, pub commit_author: Option<CommitAuthorConfig>, pub direct_commit: Option<StringOrBool>, pub update_existing_pr: Option<StringOrBool>, pub skip: Option<StringOrBool>, pub required: Option<bool>, pub if_condition: Option<String>, pub retain_on_rollback: Option<bool>,
}
Expand description

homebrew-core formula-bump publisher configuration.

Bumps an EXISTING formula in Homebrew/homebrew-core (or any formula repository override) purely through the GitHub API — no clone, no brew invocation. The formula file’s url (or tag:/revision: pair), sha256, and version stanzas are rewritten to the new release, the change is committed to a branch, and a pull request is opened against the formula repository. Each homebrew_cores[] entry bumps one formula.

Every field is optional: the formula name defaults to the crate name, the target repository defaults to Homebrew/homebrew-core, the formula path defaults to the sharded core layout (Formula/<letter>/<name>.rb, falling back to the flat Formula/<name>.rb), and the download URL defaults to the GitHub source tarball for the release tag.

homebrew_cores:
  - name: my-tool

Fields§

§id: Option<String>

Unique identifier for selecting this entry from the CLI (--id=...).

§ids: Option<Vec<String>>

Crate scoping: when set, the formula name default is derived from the first crate named here instead of the workspace’s primary crate. The workspace per-crate pattern — one homebrew_cores[] entry per crate, each scoped by ids:.

§name: Option<String>

Formula name (templated). Defaults to the scoped crate name (see ids:), then the workspace’s primary crate name, then the project name.

§repository: Option<RepositoryConfig>

Target formula repository. Defaults to Homebrew/homebrew-core. Carries the auth token override (repository.token), the base branch (repository.branch, default: the repo’s default branch), and PR settings (repository.pull_request.draft / .body).

homebrew_cores:
  - repository: { owner: my-org, name: my-formulas }
§path: Option<String>

Formula file path inside the repository (templated). Defaults to the homebrew-core sharded layout Formula/<first-letter>/<name>.rb, falling back to the flat Formula/<name>.rb used by most personal taps when the sharded path does not exist.

§download_url: Option<String>

Templated download URL written into the formula’s url stanza. Defaults to the GitHub source tarball for the release tag: https://github.com/<owner>/<repo>/archive/refs/tags/<tag>.tar.gz (owner/repo derived from the crate’s release repository, then the git remote).

§sha256: Option<String>

Hex SHA-256 of the new download (templated). When unset, anodizer downloads download_url and hashes it — the same behavior as brew bump-formula-pr without --sha256.

§commit_msg_template: Option<String>

Templated commit message (also the PR title). Default: "<formula> <version>" — the message form homebrew-core’s CI expects for version bumps.

§commit_author: Option<CommitAuthorConfig>

Commit author for the formula-bump commit, with optional signing. Its use_github_app_token is the canonical homebrew-core knob: when set, the author/committer fields are omitted from the contents-API commit so GitHub attributes it to the token’s own account — the <app-slug>[bot] identity a GitHub App workflow needs to satisfy homebrew-core’s DCO/CLA policy. Otherwise the resolved name/email (config → local git identity → the anodizer default) author the commit.

Note: signing has no effect here — formula bumps commit through the GitHub contents API, which GitHub signs server-side; the git -c commit.gpgsign path the tap/winget/krew publishers use does not apply.

homebrew_cores:
  - commit_author:
      use_github_app_token: true
§direct_commit: Option<StringOrBool>

Commit straight to the base branch instead of opening a pull request. Accepts bool or template string. Only honored for formula repositories you can push to — bumps targeting Homebrew/homebrew-core always go through a fork + PR, because homebrew-core never accepts direct pushes.

A back-compat alias for repository.pull_request.enabled: false, the preferred spelling shared with the tap/scoop/nix publishers — either one selects the direct-commit path (both are still overridden by the always-fork-and-PR rule for Homebrew/homebrew-core).

§update_existing_pr: Option<StringOrBool>

When truthy, refresh the existing bump PR in place instead of skipping it: a same-version re-cut force-resets the bump branch to the current base and re-commits the rewritten formula, so the open PR carries this run’s content rather than a stale earlier attempt (and no duplicate PR is opened). When falsy (default), an already-open bump PR is left untouched and a warning names this toggle. Accepts bool or template string. Mirrors winget / krew / homebrew_cask’s update_existing_pr.

§skip: Option<StringOrBool>

Skip this publisher. Accepts bool or template string. Accepts the legacy disable: spelling via serde alias for back-compat.

§required: Option<bool>

Override whether this publisher failing should fail the overall release.

Default: false — the bump is a PR that can be re-opened by hand, so 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), this entry is skipped. Render failure hard-errors.

§retain_on_rollback: Option<bool>

When true, a triggered rollback leaves the opened pull request in place rather than closing it. Default false.

Trait Implementations§

Source§

impl Clone for HomebrewCoreConfig

Source§

fn clone(&self) -> HomebrewCoreConfig

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 HomebrewCoreConfig

Source§

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

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

impl Default for HomebrewCoreConfig

Source§

fn default() -> HomebrewCoreConfig

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

impl<'de> Deserialize<'de> for HomebrewCoreConfig

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 HomebrewCoreConfig

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 HomebrewCoreConfig

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 HomebrewCoreConfig

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