Socket
Socket
Sign inDemoInstall

@auto-canary/brew

Package Overview
Dependencies
Maintainers
2
Versions
869
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@auto-canary/brew

Automate the creation of Homebrew formulae.


Version published
Maintainers
2
Created
Source

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:

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.

{
  "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:

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.

{
  "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"
        }
      ]
    ]
  ]
}

Keywords

FAQs

Package last updated on 01 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc