Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,21 @@ jobs:
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Rebuild the site with YARD
if: github.repository == 'Homebrew/brew'
working-directory: docs
run: bundle exec rake yard build
env:
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload pages artifact
if: github.repository == 'Homebrew/brew'
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
with:
path: docs/_site/

deploy:
needs: docs
if: ${{ github.ref_name == 'main' }}
if: ${{ github.repository == 'Homebrew/brew' && github.ref_name == 'main' }}
permissions:
pages: write
id-token: write
Expand All @@ -115,7 +117,7 @@ jobs:
deploy-issue:
name: Open/close deploy issue
needs: [docs, deploy]
if: ${{ always() && github.ref_name == 'main' }}
if: ${{ github.repository == 'Homebrew/brew' && always() && github.ref_name == 'main' }}
env:
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/dev-cmd/create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Create < AbstractCommand
and open it in the editor. Homebrew will attempt to automatically derive the
formula name and version, but if it fails, you'll have to make your own template.
The `wget` formula serves as a simple example. For the complete API, see:
<https://rubydoc.brew.sh/Formula>
<https://docs.brew.sh/rubydoc/Formula>
EOS
switch "--autotools",
description: "Create a basic template for an Autotools-style build."
Expand Down
6 changes: 3 additions & 3 deletions Library/Homebrew/formula_creator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def latest_versioned_formula(name)
def template
<<~ERB
# Documentation: https://docs.brew.sh/Formula-Cookbook
# https://rubydoc.brew.sh/Formula
# https://docs.brew.sh/rubydoc/Formula
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class #{Formulary.class_s(name)} < Formula
<% if @mode == :python %>
Expand Down Expand Up @@ -229,7 +229,7 @@ def install
system "cmake", "--install", "build"
<% elsif @mode == :autotools %>
# Remove unrecognized options if they cause configure to fail
# https://rubydoc.brew.sh/Formula.html#std_configure_args-instance_method
# https://docs.brew.sh/rubydoc/Formula.html#std_configure_args-instance_method
system "./configure", "--disable-silent-rules", *std_configure_args
system "make", "install" # if this fails, try separate make/make install steps
<% elsif @mode == :crystal %>
Expand Down Expand Up @@ -283,7 +283,7 @@ def install
system "zig", "build", *std_zig_args
<% else %>
# Remove unrecognized options if they cause configure to fail
# https://rubydoc.brew.sh/Formula.html#std_configure_args-instance_method
# https://docs.brew.sh/rubydoc/Formula.html#std_configure_args-instance_method
system "./configure", "--disable-silent-rules", *std_configure_args
# system "cmake", "-S", ".", "-B", "build", *std_cmake_args
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/manpages/brew.1.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ And for an authenticated HTTP proxy:

Homebrew Documentation: <https://docs.brew.sh>

Homebrew API: <https://rubydoc.brew.sh>
Homebrew API: <https://docs.brew.sh/rubydoc/>

`git`(1), `git-log`(1)

Expand Down
2 changes: 1 addition & 1 deletion docs/Autobump.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Other formula and cask specific reasons for why a package is not autobumped are

When using `no_autobump!`, a reason for exclusion must be provided.

There are two ways to indicate the reason. The preferred way is to use a pre-existing symbol, which can be found in [`NO_AUTOBUMP_REASONS_LIST`](https://rubydoc.brew.sh/top-level-namespace#NO_AUTOBUMP_REASONS_LIST-constant), for example:
There are two ways to indicate the reason. The preferred way is to use a pre-existing symbol, which can be found in [`NO_AUTOBUMP_REASONS_LIST`](/rubydoc/top-level-namespace.html#NO_AUTOBUMP_REASONS_LIST-constant), for example:

```ruby
no_autobump! because: :bumped_by_upstream
Expand Down
12 changes: 7 additions & 5 deletions docs/Brew-Livecheck.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@ last_review_date: 2025-05-28

# `brew livecheck`

The `brew livecheck` command finds the newest version of a formula or cask's software by checking upstream. Livecheck has [strategies](https://rubydoc.brew.sh/Homebrew/Livecheck/Strategy) to identify versions from various sources, such as Git repositories, websites, etc.
The `brew livecheck` command finds the newest version of a formula or cask's software by checking upstream. Livecheck has [strategies](/rubydoc/Homebrew/Livecheck/Strategy.html) to identify versions from various sources, such as Git repositories, websites, etc.

## Behaviour

When livecheck isn't given instructions for how to check for upstream versions, it does the following by default:

1. Collect a list of URLs to check.
* For formulae: use their `stable`, `head`, and `homepage` URLs, in that order.
* For formula resources: use their `url`.
* For casks: use their `url` and `homepage` URLs, in that order.

* For formulae: use their `stable`, `head`, and `homepage` URLs, in that order.
* For formula resources: use their `url`.
* For casks: use their `url` and `homepage` URLs, in that order.

1. Determine if any strategies apply to the first URL. If not, try the next URL.
1. If a strategy can be applied, use it to check for new versions.
1. Return the newest version (or an error if versions could not be found at any available URLs).

It's sometimes necessary to override this default behaviour to create a working check. If a source doesn't provide the newest version, we need to check a different one. If livecheck doesn't correctly match version text, we need to provide an appropriate regex or `strategy` block.

This can be accomplished by adding a `livecheck` block to the formula/cask/resource. For more information on the available methods, please refer to the [`Livecheck` class](https://rubydoc.brew.sh/Livecheck) documentation.
This can be accomplished by adding a `livecheck` block to the formula/cask/resource. For more information on the available methods, please refer to the [`Livecheck` class](/rubydoc/Livecheck.html) documentation.

## Creating a check

Expand Down
12 changes: 6 additions & 6 deletions docs/Cask-Cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Each of the following stanzas is required for every cask.

### At least one artifact stanza is also required

Each cask must declare one or more [artifacts](https://rubydoc.brew.sh/Cask/Artifact) (i.e. something to install).
Each cask must declare one or more [artifacts](/rubydoc/Cask/Artifact.html) (i.e. something to install).

| name | multiple occurrences allowed? | value |
| -------------------------------- | :---------------------------: | ----- |
Expand Down Expand Up @@ -291,7 +291,7 @@ caveats "Using #{token} may be hazardous to your health."

#### `caveats` as a block

When `caveats` is a Ruby block, evaluation is deferred until install time. Within a block you may refer to the `@cask` instance variable, and invoke [any method available on `@cask`](https://rubydoc.brew.sh/Cask/Cask).
When `caveats` is a Ruby block, evaluation is deferred until install time. Within a block you may refer to the `@cask` instance variable, and invoke [any method available on `@cask`](/rubydoc/Cask/Cask.html).

#### `caveats` mini-DSL

Expand Down Expand Up @@ -371,7 +371,7 @@ depends_on formula: "unar"

##### Requiring an exact macOS release

The value for `depends_on macos:` may be a symbol or an array of symbols, listing the exact compatible macOS releases. The values for supported macOS releases can be found in the [`MacOSVersion` class](https://rubydoc.brew.sh/MacOSVersion) documentation.
The value for `depends_on macos:` may be a symbol or an array of symbols, listing the exact compatible macOS releases. The values for supported macOS releases can be found in the [`MacOSVersion` class](/rubydoc/MacOSVersion.html) documentation.

Only major releases are covered (10.x numbers containing a single dot or whole numbers since macOS 11). The symbol form is used for readability. The following are all valid ways to enumerate the exact macOS release requirements for a cask:

Expand Down Expand Up @@ -449,7 +449,7 @@ The `because:` parameter can also accept a symbol that corresponds to a preset r
deprecate! date: "YYYY-MM-DD", because: :discontinued
```

A complete list of allowable symbols can be found in the [`DeprecateDisable` module](https://rubydoc.brew.sh/DeprecateDisable) documentation.
A complete list of allowable symbols can be found in the [`DeprecateDisable` module](/rubydoc/DeprecateDisable.html) documentation.

#### `replacement_formula:` / `replacement_cask:` parameter

Expand Down Expand Up @@ -527,7 +527,7 @@ The stanzas `preflight`, `postflight`, `uninstall_preflight`, and `uninstall_pos

#### Evaluation of blocks is always deferred

The Ruby blocks defined by these stanzas are not evaluated until install time or uninstall time. Within a block you may refer to the `@cask` instance variable, and invoke [any method available on `@cask`](https://rubydoc.brew.sh/Cask/Cask).
The Ruby blocks defined by these stanzas are not evaluated until install time or uninstall time. Within a block you may refer to the `@cask` instance variable, and invoke [any method available on `@cask`](/rubydoc/Cask/Cask.html).

#### `*flight` mini-DSL

Expand Down Expand Up @@ -655,7 +655,7 @@ The `no_autobump!` stanza excludes a cask from the autobump list. This means all
no_autobump! because: :incompatible_version_format
```

A complete list of allowed symbols can be found in [`NO_AUTOBUMP_REASONS_LIST`](https://rubydoc.brew.sh/top-level-namespace#NO_AUTOBUMP_REASONS_LIST-constant).
A complete list of allowed symbols can be found in [`NO_AUTOBUMP_REASONS_LIST`](/rubydoc/top-level-namespace.html#NO_AUTOBUMP_REASONS_LIST-constant).

Casks that use `strategy :extract_plist` in their `livecheck` block or have `version :latest` are always excluded from the autobump list and do not require `no_autobump!` to be declared.

Expand Down
2 changes: 1 addition & 1 deletion docs/Deprecating-Disabling-and-Removing-Casks.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ A cask should be removed if it does not meet our criteria for [acceptable casks]

When a cask is deprecated or disabled, a reason explaining the action must be provided.

There are two ways to indicate the reason. The preferred way is to use a pre-existing symbol to indicate the reason. The available symbols are listed below and can be found in the [`DeprecateDisable` module](https://rubydoc.brew.sh/DeprecateDisable.html):
There are two ways to indicate the reason. The preferred way is to use a pre-existing symbol to indicate the reason. The available symbols are listed below and can be found in the [`DeprecateDisable` module](/rubydoc/DeprecateDisable.html.html):

- `:discontinued`: the cask is discontinued upstream
- `:moved_to_mas`: the cask is now exclusively distributed on the Mac App Store
Expand Down
2 changes: 1 addition & 1 deletion docs/Deprecating-Disabling-and-Removing-Formulae.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ A formula should be removed if it does not meet our criteria for [acceptable for

When a formula is deprecated or disabled, a reason explaining the action must be provided.

There are two ways to indicate the reason. The preferred way is to use a pre-existing symbol to indicate the reason. The available symbols are listed below and can be found in the [`DeprecateDisable` module](https://rubydoc.brew.sh/DeprecateDisable.html):
There are two ways to indicate the reason. The preferred way is to use a pre-existing symbol to indicate the reason. The available symbols are listed below and can be found in the [`DeprecateDisable` module](/rubydoc/DeprecateDisable.html.html):

- `:does_not_build`: the formula cannot be built from source on any supported macOS version or Linux.
- `:no_license`: we cannot identify a license for the formula
Expand Down
2 changes: 1 addition & 1 deletion docs/External-Commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ An executable script for a command named `extcmd` should be named `brew-extcmd`.

## Providing `--help`

All internal and external Homebrew commands can provide styled `--help` output by using Homebrew’s [argument parser](https://rubydoc.brew.sh/Homebrew/CLI/Parser), as seen in the [`brew test-bot` command](https://github.com/Homebrew/homebrew-test-bot/blob/HEAD/cmd/test-bot.rb); or by including lines starting with `#:` (a comment then `:` character in both Bash and Ruby), as seen in the [header of `update.sh`](https://github.com/Homebrew/brew/blob/cf7def0c68903814c6b4e04a55fe8f3cb3f5605e/Library/Homebrew/cmd/update.sh#L1-L10), which is printed with `brew update --help`.
All internal and external Homebrew commands can provide styled `--help` output by using Homebrew’s [argument parser](/rubydoc/Homebrew/CLI/Parser.html), as seen in the [`brew test-bot` command](https://github.com/Homebrew/homebrew-test-bot/blob/HEAD/cmd/test-bot.rb); or by including lines starting with `#:` (a comment then `:` character in both Bash and Ruby), as seen in the [header of `update.sh`](https://github.com/Homebrew/brew/blob/cf7def0c68903814c6b4e04a55fe8f3cb3f5605e/Library/Homebrew/cmd/update.sh#L1-L10), which is printed with `brew update --help`.

## Unofficial external commands

Expand Down
Loading
Loading