# @auto-canary/brew

> Automate the creation of Homebrew formulae.

Latest version **9.23.0-canary.1099.14362.0** (published 2020-04-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @auto-canary/brew
pnpm add @auto-canary/brew
yarn add @auto-canary/brew
bun add @auto-canary/brew
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 9.23.0-canary.1099.14362.0 |
| Published | 2020-04-01 |
| First published | 2020-04-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 12.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2499 |
| Author | Andrew Lisowski |
| Maintainers | hipstersmoothie-canary, alisowski |
| Keywords | automation, semantic, release, github, labels, automated, continuos integration, changelog |

## Links

- npm: https://www.npmjs.com/package/@auto-canary/brew
- Repository: https://github.com/intuit/auto
- Homepage: https://github.com/intuit/auto#readme
- Issues: https://github.com/intuit/auto/issues
- npm.io page: https://npm.io/package/@auto-canary/brew

## Dependencies (4)

- [fp-ts](https://npm.io/package/fp-ts.md) ^2.5.3
- [io-ts](https://npm.io/package/io-ts.md) ^2.1.2
- [tslib](https://npm.io/package/tslib.md) 1.10.0
- [@auto-canary/core](https://npm.io/package/@auto-canary/core.md) 9.23.0-canary.1099.14362.0

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 9.23.0-canary.1099.14362.0 (latest) — 2020-04-01
- 11.3.0--canary.2478.87bcf4d47797ed8cc7152538b86fd742d8d19462.0 (canary) — 2024-10-25
- 11.2.0--canary.2467.bb9bf1e8d1186bc73fa8deffb2f661a893697f58.0 — 2024-07-12
- 11.2.0--canary.2467.aeb3bae59eabea52cff915e4bdacfeef6e3f60ac.0 — 2024-07-12
- 11.2.0--canary.2467.3349baa9762f8096eea4efc7eff36074e1f1edf7.0 — 2024-07-12
- 11.2.0--canary.2467.7402d2f103745416de87db0d52f53585eb7ba3a6.0 — 2024-07-12
- 11.2.0--canary.2467.6dc36ab3a976a4fcf7a74d4cb947b3835d609e17.0 — 2024-07-12
- 11.2.0--canary.2467.03a4a559eee8bdeb7c81446326ec083a874b74a0.0 — 2024-07-12
- 11.1.7--canary.2461.7a3498705dce3d8773af8a1a4dd47e2416350943.0 — 2024-05-16
- 11.1.7--canary.2461.0814b2276a0e49c72936fe2d4f1e4df84b4ae5a9.0 — 2024-05-16
- 11.1.5--canary.2453.90152ce68f149ff523ca14acde6719747382bdea.0 — 2024-04-04
- 11.1.4--canary.2451.570547f2bceca82bf6bfd970024b37197c575e94.0 — 2024-04-04
- 11.0.3--canary.2397.34c748d42b6213d66d537133b694ddbaa3f048f0.0 — 2023-09-09
- 11.0.0--canary.2378.9b5f1efc67fde76c49dbd17e9c46e56416ccf464.0 — 2023-07-28
- 10.47.0--canary.2376.1f41411505f36958dfa6efe638f9ad6a1f24443c.0 — 2023-07-13
- … 855 more at https://npm.io/package/@auto-canary/brew/versions

## README

# Brew Plugin

Automate the creation of Homebrew formulae.

> NOTE: This plugin does not work in `lerna` monorepos that use `independent` versioning.

## Installation

This plugin is not included with the `auto` CLI installed via NPM. To install:

```sh
npm i --save-dev @auto-it/brew
# or
yarn add -D @auto-it/brew
```

## Usage

To use this plugin you will need to add the required configuration and a template file.

```jsonc
{
  "plugins": [
    [
      "brew",
      {
        // REQUIRED: The executable to create a formula for
        "executable": "path/to/some/executable",
        // REQUIRED: The name of the formula to create
        "name": "name-of-formula",
        // Optional: A path to the formula template. Default is './formula-template.rb'
        "formula": "path/to/formula/template"
      }
    ]
    // other plugins
  ]
}
```

Create a template name `./formula-template.rb` at the root of the project (or use the `formula` option to customize the location)/
The template file must be a valid homebrew ruby file.

`auto` will replace the following tokens in the template file:

- `$VERSION` - The version being published
- `$SHA` - The sha of the executable being included in the formula

Here is the template `auto` uses to publish it's own `brew` formula:

```ruby
class Auto < Formula
  desc "Generate releases based on semantic version labels on pull requests."
  homepage "https://intuit.github.io/auto/home.html"
  url "https://github.com/intuit/auto/releases/download/$VERSION/auto-macos.gz"
  version "$VERSION"
  sha256 "$SHA"

  def install
    libexec.install Dir["*"]
    bin.install libexec/"auto-macos"
    mv bin/"auto-macos", bin/"auto"
  end

  test do
    system bin/"auto", "--version"
  end
end
```

### Multiple Formulae

You can also use this to create multiple `brew` formulae.

```jsonc
{
  "plugins": [
    [
      "brew",
      [
        {
          "executable": "path/to/some/executable",
          "name": "name-of-formula",
          "formula": "path/to/formula/template"
        },
        {
          "executable": "path/to/another/executable",
          "name": "another-formula",
          "formula": "path/to/formula/another"
        }
      ]
    ]
  ]
}
```

---
_Source: https://npm.io/package/@auto-canary/brew · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
