Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@auto-canary/brew

Package Overview
Dependencies
Maintainers
0
Versions
870
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.

  • 11.2.0--canary.2467.03a4a559eee8bdeb7c81446326ec083a874b74a0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
531
increased by1796.43%
Maintainers
0
Weekly downloads
 
Created
Source

Brew Plugin

Automate the creation of Homebrew formulae. This plugin can be use with any other package manager plugin.

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.

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

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 12 Jul 2024

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