• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

sous-chefs/homebrew: Development repository for the homebrew cookbook

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

sous-chefs/homebrew

开源软件地址:

https://github.com/sous-chefs/homebrew

开源编程语言:

Ruby 100.0%

开源软件介绍:

Homebrew Cookbook

Cookbook Version CI State OpenCollective OpenCollective License

This cookbook installs Homebrew and provides resources for working with taps and casks

Note: The homebrew_tap and homebrew_cask resources shipped in Chef 14.0. When Chef 15.0 is released in April 2019 these resources will be removed from this cookbook as all users should be on 14.0 or later.

Maintainers

This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.

Requirements

Platforms

  • macOS

Chef

  • Chef 12.7+

Cookbooks

  • none

Resources

homebrew_tap

Resource for brew tap, a Homebrew command used to add additional formula repositories. From the brew man page:

brew tap [--full] user/repo [URL]
    Tap a formula repository.

    With URL unspecified, taps a formula repository from GitHub using HTTPS.
    Since so many taps are hosted on GitHub, this command is a shortcut for
    tap user/repo https://github.com/user/homebrew-repo.

    With URL specified, taps a formula repository from anywhere, using
    any transport protocol that git handles. The one-argument form of tap
    simplifies but also limits. This two-argument command makes no
    assumptions, so taps can be cloned from places other than GitHub and
    using protocols other than HTTPS, e.g., SSH, GIT, HTTP, FTP(S), RSYNC.

    By default, the repository is cloned as a shallow copy (--depth=1), but
    if --full is passed, a full clone will be used. To convert a shallow copy
    to a full copy, you can retap passing --full without first untapping.

Default action is :tap which enables the repository. Use :untap to disable a tapped repository.

Actions

  • :tap (default) - Add a tap
  • :untap - Remove a tap

Properties

  • :tap_name - Optional name property to override the resource name value
  • :url - Optional URL to the tap
  • :full - Perform a full clone rather than a shallow clone on the tap (default: false)
  • :homebrew_path - the path to the homebrew binary (default: '/usr/local/bin/brew')
  • :owner - the owner of the homebrew installation (default: calculated based on existing files)

Examples

homebrew_tap 'homebrew/dupes'

homebrew_tap 'homebrew/dupes' do
  action :untap
end

homebrew_tap "Let's install homebrew/dupes" do
  tap_name 'homebrew/dupes'
  url 'https://github.com/homebrew/homebrew-dupes.git'
  full true
end

homebrew_cask

Resource for brew cask, a Homebrew-style CLI workflow for the administration of Mac applications distributed as binaries. It's implemented as a homebrew "external command" called cask.

homebrew-cask on GitHub

Actions

  • :install (default) - install an Application
  • :remove - remove an Application.

Properties

  • :cask_name - Optional name property to override the resource name value
  • :options - options to pass to the brew CLI during installation
  • :install_cask - auto install cask tap if necessary (default: true)
  • :homebrew_path - the path to the homebrew binary (default: '/usr/local/bin/brew')
  • :owner - the owner of the homebrew installation (default: calculated based on existing files)

Examples

homebrew_cask 'google-chrome'

homebrew_cask "Let's remove google-chrome" do
  cask_name 'google-chrome'
  install_cask false
  action :remove
end

View the list of available Casks

Attributes

  • node['homebrew']['owner'] - The user that will own the Homebrew installation and packages. Setting this will override the default behavior which is to use the non-privileged user that has invoked the Chef run (or the SUDO_USER if invoked with sudo). The default is nil.

  • node['homebrew']['auto-update'] - Whether the default recipe should automatically update Homebrew each run or not. The default is true to maintain compatibility. Set to false or nil to disable. Note that disabling this feature may cause formula to not work.

  • node['homebrew']['formulas'] - An Array of formula that should be installed using Homebrew by default, used only in the homebrew::install_formulas recipe.

    • To install the most recent version, include just the recipe name: - simple_formula

    • To install a specific version, specify both its name and version:

      - name: special-version-formula
        version: 1.2.3
      
    • To install the HEAD of a formula, specify both its name and head: true:

      - name: head-tracking-formula
        head: true
      
    • To provide other options, specify both its name and options

      - name: formula-with-options
        options: --with-option-1 --with-other-option
      
  • node['homebrew']['casks'] - An Array of casks that should be installed using brew cask by default, used only in the homebrew::install_casks recipe.

  • node['homebrew']['taps'] - An Array of taps that should be installed using brew tap by default, used only in the homebrew::install_taps recipe. For example:

    [
      'homebrew/science',
      # 'tap' is the only required key for the Hash
      { 'tap' => 'homebrew/dupes', 'url' => 'https://github.com', 'full' => true }
    ]

Usage

We strongly recommend that you put "recipe[homebrew]" in your node's run list, to ensure that it is available on the system and that Homebrew itself gets installed. Putting an explicit dependency in the metadata will cause the cookbook to be downloaded and the library loaded, thus resulting in changing the package provider on macOS, so if you have systems you want to use the default (Mac Ports), they would be changed to Homebrew.

The default recipe also ensures that Homebrew is installed and up to date if the auto-update attribute (above) is true (default).

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers!

https://opencollective.com/sous-chefs#backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

https://opencollective.com/sous-chefs/sponsor/0/website https://opencollective.com/sous-chefs/sponsor/1/website https://opencollective.com/sous-chefs/sponsor/2/website https://opencollective.com/sous-chefs/sponsor/3/website https://opencollective.com/sous-chefs/sponsor/4/website https://opencollective.com/sous-chefs/sponsor/5/website https://opencollective.com/sous-chefs/sponsor/6/website https://opencollective.com/sous-chefs/sponsor/7/website https://opencollective.com/sous-chefs/sponsor/8/website https://opencollective.com/sous-chefs/sponsor/9/website




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
aschzero/homebridge-sesame: 发布时间:2022-06-14
下一篇:
plhyhc/homebridge-garage-door-wsensor发布时间:2022-06-14
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap