Merge pull request #881 from MikeMcQuaid/dev-cmd-sticky-homebrew-developer

Set HOMEBREW_DEVELOPER automatically
This commit is contained in:
Mike McQuaid 2016-09-09 08:30:26 +01:00 committed by GitHub
commit 930bcb7c52
22 changed files with 404 additions and 187 deletions

View File

@ -64,8 +64,13 @@ begin
if cmd if cmd
internal_cmd = require? HOMEBREW_LIBRARY_PATH.join("cmd", cmd) internal_cmd = require? HOMEBREW_LIBRARY_PATH.join("cmd", cmd)
if !internal_cmd && ARGV.homebrew_developer? unless internal_cmd
internal_cmd = require? HOMEBREW_LIBRARY_PATH.join("dev-cmd", cmd) internal_cmd = require? HOMEBREW_LIBRARY_PATH.join("dev-cmd", cmd)
if internal_cmd && !ARGV.homebrew_developer?
safe_system "git", "config", "--file=#{HOMEBREW_REPOSITORY}/.git/config",
"--replace-all", "homebrew.devcmdrun", "true"
ENV["HOMEBREW_DEV_CMD_RUN"] = "1"
end
end end
end end

View File

@ -191,11 +191,26 @@ case "$HOMEBREW_COMMAND" in
--config) HOMEBREW_COMMAND="config" ;; --config) HOMEBREW_COMMAND="config" ;;
esac esac
if [[ -z "$HOMEBREW_DEVELOPER" ]]
then
export HOMEBREW_GIT_CONFIG_FILE="$HOMEBREW_REPOSITORY/.git/config"
HOMEBREW_GIT_CONFIG_DEVELOPERMODE="$(git config --file="$HOMEBREW_GIT_CONFIG_FILE" --get homebrew.devcmdrun)"
if [[ "$HOMEBREW_GIT_CONFIG_DEVELOPERMODE" = "true" ]]
then
export HOMEBREW_DEV_CMD_RUN="1"
fi
fi
if [[ -f "$HOMEBREW_LIBRARY/Homebrew/cmd/$HOMEBREW_COMMAND.sh" ]] if [[ -f "$HOMEBREW_LIBRARY/Homebrew/cmd/$HOMEBREW_COMMAND.sh" ]]
then then
HOMEBREW_BASH_COMMAND="$HOMEBREW_LIBRARY/Homebrew/cmd/$HOMEBREW_COMMAND.sh" HOMEBREW_BASH_COMMAND="$HOMEBREW_LIBRARY/Homebrew/cmd/$HOMEBREW_COMMAND.sh"
elif [[ -n "$HOMEBREW_DEVELOPER" && -f "$HOMEBREW_LIBRARY/Homebrew/dev-cmd/$HOMEBREW_COMMAND.sh" ]] elif [[ -f "$HOMEBREW_LIBRARY/Homebrew/dev-cmd/$HOMEBREW_COMMAND.sh" ]]
then then
if [[ -z "$HOMEBREW_DEVELOPER" ]]
then
git config --file="$HOMEBREW_GIT_CONFIG_FILE" --replace-all homebrew.devcmdrun true
export HOMEBREW_DEV_CMD_RUN="1"
fi
HOMEBREW_BASH_COMMAND="$HOMEBREW_LIBRARY/Homebrew/dev-cmd/$HOMEBREW_COMMAND.sh" HOMEBREW_BASH_COMMAND="$HOMEBREW_LIBRARY/Homebrew/dev-cmd/$HOMEBREW_COMMAND.sh"
fi fi

View File

@ -1,13 +1,15 @@
#: * `command` <cmd>: #: * `command` <cmd>:
#: Display the path to the file which is used when invoking `brew` <cmd>. #: Display the path to the file which is used when invoking `brew` <cmd>.
require "commands"
module Homebrew module Homebrew
def command def command
abort "This command requires a command argument" if ARGV.empty? abort "This command requires a command argument" if ARGV.empty?
cmd = ARGV.first cmd = ARGV.first
cmd = HOMEBREW_INTERNAL_COMMAND_ALIASES.fetch(cmd, cmd) cmd = HOMEBREW_INTERNAL_COMMAND_ALIASES.fetch(cmd, cmd)
if (path = internal_command_path cmd) if (path = Commands.path(cmd))
puts path puts path
elsif (path = which("brew-#{cmd}") || which("brew-#{cmd}.rb")) elsif (path = which("brew-#{cmd}") || which("brew-#{cmd}.rb"))
puts path puts path
@ -15,17 +17,4 @@ module Homebrew
odie "Unknown command: #{cmd}" odie "Unknown command: #{cmd}"
end end
end end
private
def internal_command_path(cmd)
extensions = %w[rb sh]
paths = extensions.map { |ext| HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.#{ext}" }
if ARGV.homebrew_developer?
paths += extensions.map { |ext| HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.#{ext}" }
end
paths.find { |p| p.file? }
end
end end

View File

@ -8,7 +8,7 @@ module Homebrew
def commands def commands
if ARGV.include? "--quiet" if ARGV.include? "--quiet"
cmds = internal_commands + external_commands cmds = internal_commands + external_commands
cmds += internal_development_commands if ARGV.homebrew_developer? cmds += internal_developer_commands
cmds += HOMEBREW_INTERNAL_COMMAND_ALIASES.keys if ARGV.include? "--include-aliases" cmds += HOMEBREW_INTERNAL_COMMAND_ALIASES.keys if ARGV.include? "--include-aliases"
puts_columns cmds.sort puts_columns cmds.sort
else else
@ -19,8 +19,8 @@ module Homebrew
# Find commands in Homebrew/dev-cmd # Find commands in Homebrew/dev-cmd
if ARGV.homebrew_developer? if ARGV.homebrew_developer?
puts puts
puts "Built-in development commands" puts "Built-in developer commands"
puts_columns internal_development_commands puts_columns internal_developer_commands
end end
# Find commands in the path # Find commands in the path
@ -36,7 +36,7 @@ module Homebrew
find_internal_commands HOMEBREW_LIBRARY_PATH/"cmd" find_internal_commands HOMEBREW_LIBRARY_PATH/"cmd"
end end
def internal_development_commands def internal_developer_commands
find_internal_commands HOMEBREW_LIBRARY_PATH/"dev-cmd" find_internal_commands HOMEBREW_LIBRARY_PATH/"dev-cmd"
end end

View File

@ -13,7 +13,7 @@ Troubleshooting:
brew doctor brew doctor
brew install -vd FORMULA brew install -vd FORMULA
Brewing: Developers:
brew create [URL [--no-fetch]] brew create [URL [--no-fetch]]
brew edit [FORMULA...] brew edit [FORMULA...]
https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Formula-Cookbook.md https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Formula-Cookbook.md
@ -31,12 +31,14 @@ EOS
# NOTE Keep lines less than 80 characters! Wrapping is just not cricket. # NOTE Keep lines less than 80 characters! Wrapping is just not cricket.
# NOTE The reason the string is at the top is so 25 lines is easy to measure! # NOTE The reason the string is at the top is so 25 lines is easy to measure!
require "commands"
module Homebrew module Homebrew
def help(cmd = nil, flags = {}) def help(cmd = nil, flags = {})
# Resolve command aliases and find file containing the implementation. # Resolve command aliases and find file containing the implementation.
if cmd if cmd
cmd = HOMEBREW_INTERNAL_COMMAND_ALIASES.fetch(cmd, cmd) cmd = HOMEBREW_INTERNAL_COMMAND_ALIASES.fetch(cmd, cmd)
path = command_path(cmd) path = Commands.path(cmd)
end end
# Display command-specific (or generic) help in response to `UsageError`. # Display command-specific (or generic) help in response to `UsageError`.
@ -69,18 +71,6 @@ module Homebrew
private private
def command_path(cmd)
if File.exist?(HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.sh")
HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.sh"
elsif ARGV.homebrew_developer? && File.exist?(HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.sh")
HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.sh"
elsif File.exist?(HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.rb")
HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.rb"
elsif ARGV.homebrew_developer? && File.exist?(HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.rb")
HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.rb"
end
end
def command_help(path) def command_help(path)
help_lines = path.read.lines.grep(/^#:/) help_lines = path.read.lines.grep(/^#:/)
if help_lines.empty? if help_lines.empty?

View File

@ -159,7 +159,7 @@ reset_on_interrupt() {
git reset --hard "$INITIAL_REVISION" "${QUIET_ARGS[@]}" git reset --hard "$INITIAL_REVISION" "${QUIET_ARGS[@]}"
fi fi
if [[ -n "$HOMEBREW_DEVELOPER" ]] if [[ -n "$HOMEBREW_NO_UPDATE_CLEANUP" ]]
then then
pop_stash pop_stash
else else
@ -243,7 +243,7 @@ EOS
if [[ "$INITIAL_BRANCH" != "$UPSTREAM_BRANCH" && -n "$INITIAL_BRANCH" ]] if [[ "$INITIAL_BRANCH" != "$UPSTREAM_BRANCH" && -n "$INITIAL_BRANCH" ]]
then then
if [[ -z "$HOMEBREW_DEVELOPER" ]] if [[ -z "$HOMEBREW_NO_UPDATE_CLEANUP" ]]
then then
echo "Checking out $UPSTREAM_BRANCH in $DIR..." echo "Checking out $UPSTREAM_BRANCH in $DIR..."
echo "To checkout $INITIAL_BRANCH in $DIR run:" echo "To checkout $INITIAL_BRANCH in $DIR run:"
@ -286,7 +286,7 @@ EOS
trap '' SIGINT trap '' SIGINT
if [[ -n "$HOMEBREW_DEVELOPER" ]] if [[ -n "$HOMEBREW_NO_UPDATE_CLEANUP" ]]
then then
if [[ "$INITIAL_BRANCH" != "$UPSTREAM_BRANCH" && -n "$INITIAL_BRANCH" ]] if [[ "$INITIAL_BRANCH" != "$UPSTREAM_BRANCH" && -n "$INITIAL_BRANCH" ]]
then then
@ -335,6 +335,14 @@ EOS
set -x set -x
fi fi
if [[ -z "$HOMEBREW_UPDATE_CLEANUP" ]]
then
if [[ -n "$HOMEBREW_DEVELOPER" || -n "$HOMEBREW_DEV_CMD_RUN" ]]
then
export HOMEBREW_NO_UPDATE_CLEANUP="1"
fi
fi
if [[ -z "$HOMEBREW_AUTO_UPDATE_SECS" ]] if [[ -z "$HOMEBREW_AUTO_UPDATE_SECS" ]]
then then
HOMEBREW_AUTO_UPDATE_SECS="60" HOMEBREW_AUTO_UPDATE_SECS="60"

View File

@ -0,0 +1,13 @@
module Commands
def self.path(cmd)
if File.exist?(HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.sh")
HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.sh"
elsif File.exist?(HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.sh")
HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.sh"
elsif File.exist?(HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.rb")
HOMEBREW_LIBRARY_PATH/"cmd/#{cmd}.rb"
elsif File.exist?(HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.rb")
HOMEBREW_LIBRARY_PATH/"dev-cmd/#{cmd}.rb"
end
end
end

View File

@ -1,4 +1,3 @@
#: @hide_from_man_page
#: * `bottle` [`--verbose`] [`--no-rebuild`] [`--keep-old`] [`--skip-relocation`] [`--root-url=<root_url>`]: #: * `bottle` [`--verbose`] [`--no-rebuild`] [`--keep-old`] [`--skip-relocation`] [`--root-url=<root_url>`]:
#: * `bottle` `--merge` [`--no-commit`] [`--keep-old`] [`--write`]: #: * `bottle` `--merge` [`--no-commit`] [`--keep-old`] [`--write`]:
#: #:

View File

@ -1,4 +1,3 @@
#: @hide_from_man_page
#: * `man`: #: * `man`:
#: Generate Homebrew's manpages. #: Generate Homebrew's manpages.
@ -34,11 +33,8 @@ module Homebrew
convert_man_page(cask_markup, TARGET_MAN_PATH/"brew-cask.1") convert_man_page(cask_markup, TARGET_MAN_PATH/"brew-cask.1")
end end
def build_man_page def path_glob_commands(glob)
template = (SOURCE_PATH/"brew.1.md.erb").read Pathname.glob(glob).
variables = OpenStruct.new
variables[:commands] = Pathname.glob("#{HOMEBREW_LIBRARY_PATH}/cmd/*.{rb,sh}").
sort_by { |source_file| sort_key_for_path(source_file) }. sort_by { |source_file| sort_key_for_path(source_file) }.
map { |source_file| map { |source_file|
source_file.read.lines. source_file.read.lines.
@ -47,7 +43,14 @@ module Homebrew
join join
}. }.
reject { |s| s.strip.empty? || s.include?("@hide_from_man_page") } reject { |s| s.strip.empty? || s.include?("@hide_from_man_page") }
end
def build_man_page
template = (SOURCE_PATH/"brew.1.md.erb").read
variables = OpenStruct.new
variables[:commands] = path_glob_commands("#{HOMEBREW_LIBRARY_PATH}/cmd/*.{rb,sh}")
variables[:developer_commands] = path_glob_commands("#{HOMEBREW_LIBRARY_PATH}/dev-cmd/*.{rb,sh}")
variables[:maintainers] = (HOMEBREW_REPOSITORY/"README.md"). variables[:maintainers] = (HOMEBREW_REPOSITORY/"README.md").
read[/Homebrew's current maintainers are (.*)\./, 1]. read[/Homebrew's current maintainers are (.*)\./, 1].
scan(/\[([^\]]*)\]/).flatten scan(/\[([^\]]*)\]/).flatten

View File

@ -1,10 +1,8 @@
#: @hide_from_man_page
#: `pull` [`--bottle`] [`--bump`] [`--clean`] [`--ignore-whitespace`] [`--resolve`] [`--branch-okay`] [`--no-pbcopy`] [`--no-publish`] <patch-source> [<patch-source>] #: `pull` [`--bottle`] [`--bump`] [`--clean`] [`--ignore-whitespace`] [`--resolve`] [`--branch-okay`] [`--no-pbcopy`] [`--no-publish`] <patch-source> [<patch-source>]
#: #:
#: Gets a patch from a GitHub commit or pull request and applies it to Homebrew. #: Gets a patch from a GitHub commit or pull request and applies it to Homebrew.
#: Optionally, installs the formulae changed by the patch. #: Optionally, installs the formulae changed by the patch.
#: #:
#:
#: Each <patch-source> may be one of: #: Each <patch-source> may be one of:
#: * The ID number of a PR (Pull Request) in the homebrew/core GitHub #: * The ID number of a PR (Pull Request) in the homebrew/core GitHub
#: repository #: repository

View File

@ -1,4 +1,3 @@
#: @hide_from_man_page
#: * `tap_readme` [`-v`] <name>: #: * `tap_readme` [`-v`] <name>:
#: Generate the README.md file for a new tap. #: Generate the README.md file for a new tap.

View File

@ -1,4 +1,3 @@
#: @hide_from_man_page
#: * `tests` [`-v`] [`--coverage`] [`--generic`] [`--no-compat`] [`--only=`<test_script/test_method>] [`--seed` <seed>] [`--trace`] [`--online`] [`--official-cmd-taps`]: #: * `tests` [`-v`] [`--coverage`] [`--generic`] [`--no-compat`] [`--only=`<test_script/test_method>] [`--seed` <seed>] [`--trace`] [`--online`] [`--official-cmd-taps`]:
#: Run Homebrew's unit and integration tests. #: Run Homebrew's unit and integration tests.

View File

@ -1,4 +1,3 @@
#: @hide_from_man_page
#: * `update-test` [`--commit=<sha1>`] [`--before=<date>`] [`--keep-tmp`]: #: * `update-test` [`--commit=<sha1>`] [`--before=<date>`] [`--keep-tmp`]:
#: Runs a test of `brew update` with a new repository clone. #: Runs a test of `brew update` with a new repository clone.
#: #:

View File

@ -50,6 +50,10 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
<%= commands.join("\n") %> <%= commands.join("\n") %>
## DEVELOPER COMMANDS
<%= developer_commands.join("\n") %>
## EXTERNAL COMMANDS ## EXTERNAL COMMANDS
Homebrew, like `git`(1), supports external commands. These are executable Homebrew, like `git`(1), supports external commands. These are executable

View File

@ -2,7 +2,7 @@ require "testing_env"
require "fileutils" require "fileutils"
require "pathname" require "pathname"
require "formulary" require "formulary"
require "cmd/audit" require "dev-cmd/audit"
class FormulaTextTests < Homebrew::TestCase class FormulaTextTests < Homebrew::TestCase
def setup def setup

View File

@ -29,8 +29,8 @@ class CommandsTests < Homebrew::TestCase
refute cmds.include?("rbdevcmd"), "Dev commands shouldn't be included" refute cmds.include?("rbdevcmd"), "Dev commands shouldn't be included"
end end
def test_internal_development_commands def test_internal_developer_commands
cmds = Homebrew.internal_development_commands cmds = Homebrew.internal_developer_commands
assert cmds.include?("rbdevcmd"), "Ruby commands files should be recognized" assert cmds.include?("rbdevcmd"), "Ruby commands files should be recognized"
assert cmds.include?("shdevcmd"), "Shell commands files should be recognized" assert cmds.include?("shdevcmd"), "Shell commands files should be recognized"
refute cmds.include?("rbcmd"), "Non-dev commands shouldn't be included" refute cmds.include?("rbcmd"), "Non-dev commands shouldn't be included"
@ -63,20 +63,16 @@ class CommandsTests < Homebrew::TestCase
def test_internal_command_path def test_internal_command_path
assert_equal HOMEBREW_LIBRARY_PATH/"cmd/rbcmd.rb", assert_equal HOMEBREW_LIBRARY_PATH/"cmd/rbcmd.rb",
Homebrew.send(:internal_command_path, "rbcmd") Commands.path("rbcmd")
assert_equal HOMEBREW_LIBRARY_PATH/"cmd/shcmd.sh", assert_equal HOMEBREW_LIBRARY_PATH/"cmd/shcmd.sh",
Homebrew.send(:internal_command_path, "shcmd") Commands.path("shcmd")
assert_nil Homebrew.send(:internal_command_path, "idontexist1234") assert_nil Commands.path("idontexist1234")
end end
def test_internal_dev_command_path def test_internal_dev_command_path
ARGV.stubs(:homebrew_developer?).returns false
assert_nil Homebrew.send(:internal_command_path, "rbdevcmd")
ARGV.stubs(:homebrew_developer?).returns true
assert_equal HOMEBREW_LIBRARY_PATH/"dev-cmd/rbdevcmd.rb", assert_equal HOMEBREW_LIBRARY_PATH/"dev-cmd/rbdevcmd.rb",
Homebrew.send(:internal_command_path, "rbdevcmd") Commands.path("rbdevcmd")
assert_equal HOMEBREW_LIBRARY_PATH/"dev-cmd/shdevcmd.sh", assert_equal HOMEBREW_LIBRARY_PATH/"dev-cmd/shdevcmd.sh",
Homebrew.send(:internal_command_path, "shdevcmd") Commands.path("shdevcmd")
end end
end end

View File

@ -39,29 +39,6 @@ If no search term is given, all locally available formulae are listed.</p></dd>
Read more at <a href="https://git.io/brew-analytics" data-bare-link="true">https://git.io/brew-analytics</a>.</p></dd> Read more at <a href="https://git.io/brew-analytics" data-bare-link="true">https://git.io/brew-analytics</a>.</p></dd>
<dt><code>analytics</code> (<code>on</code>|<code>off</code>)</dt><dd><p>Turn on/off Homebrew's analytics.</p></dd> <dt><code>analytics</code> (<code>on</code>|<code>off</code>)</dt><dd><p>Turn on/off Homebrew's analytics.</p></dd>
<dt><code>analytics</code> <code>regenerate-uuid</code></dt><dd><p>Regenerate UUID used in Homebrew's analytics.</p></dd> <dt><code>analytics</code> <code>regenerate-uuid</code></dt><dd><p>Regenerate UUID used in Homebrew's analytics.</p></dd>
<dt><code>audit</code> [<code>--strict</code>] [<code>--online</code>] [<code>--new-formula</code>] [<code>--display-cop-names</code>] [<code>--display-filename</code>] [<var>formulae</var>]</dt><dd><p>Check <var>formulae</var> for Homebrew coding style violations. This should be
run before submitting a new formula.</p>
<p>If no <var>formulae</var> are provided, all of them are checked.</p>
<p>If <code>--strict</code> is passed, additional checks are run, including RuboCop
style checks.</p>
<p>If <code>--online</code> is passed, additional slower checks that require a network
connection are run.</p>
<p>If <code>--new-formula</code> is passed, various additional checks are run that check
if a new formula is eligable for Homebrew. This should be used when creating
new formulae and implies <code>--strict</code> and <code>--online</code>.</p>
<p>If <code>--display-cop-names</code> is passed, the RuboCop cop name for each violation
is included in the output.</p>
<p>If <code>--display-filename</code> is passed, every line of output is prefixed with the
name of the file or formula being audited, to make the output easy to grep.</p>
<p><code>audit</code> exits with a non-zero status if any errors are found. This is useful,
for instance, for implementing pre-commit hooks.</p></dd>
<dt><code>cat</code> <var>formula</var></dt><dd><p>Display the source to <var>formula</var>.</p></dd> <dt><code>cat</code> <var>formula</var></dt><dd><p>Display the source to <var>formula</var>.</p></dd>
<dt><code>cleanup</code> [<code>--prune=</code><var>days</var>] [<code>--dry-run</code>] [<code>-s</code>] [<var>formulae</var>]</dt><dd><p>For all installed or specific formulae, remove any older versions from the <dt><code>cleanup</code> [<code>--prune=</code><var>days</var>] [<code>--dry-run</code>] [<code>-s</code>] [<var>formulae</var>]</dt><dd><p>For all installed or specific formulae, remove any older versions from the
cellar. In addition, old downloads from the Homebrew download-cache are deleted.</p> cellar. In addition, old downloads from the Homebrew download-cache are deleted.</p>
@ -82,24 +59,6 @@ With <code>--include-aliases</code>, the aliases of internal commands will be in
<dt class="flush"><code>config</code></dt><dd><p>Show Homebrew and system configuration useful for debugging. If you file <dt class="flush"><code>config</code></dt><dd><p>Show Homebrew and system configuration useful for debugging. If you file
a bug report, you will likely be asked for this information if you do not a bug report, you will likely be asked for this information if you do not
provide it.</p></dd> provide it.</p></dd>
<dt><code>create</code> <var>URL</var> [<code>--autotools</code>|<code>--cmake</code>] [<code>--no-fetch</code>] [<code>--set-name</code> <var>name</var>] [<code>--set-version</code> <var>version</var>] [<code>--tap</code> <var>user</var><code>/</code><var>repo</var>]</dt><dd><p>Generate a formula for the downloadable file at <var>URL</var> 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 <code>wget</code>
formula serves as a simple example. For the complete API have a look at</p>
<p><a href="http://www.rubydoc.info/github/Homebrew/brew/master/Formula" data-bare-link="true">http://www.rubydoc.info/github/Homebrew/brew/master/Formula</a></p>
<p>If <code>--autotools</code> is passed, create a basic template for an Autotools-style build.
If <code>--cmake</code> is passed, create a basic template for a CMake-style build.</p>
<p>If <code>--no-fetch</code> is passed, Homebrew will not download <var>URL</var> to the cache and
will thus not add the SHA256 to the formula for you.</p>
<p>The options <code>--set-name</code> and <code>--set-version</code> each take an argument and allow
you to explicitly set the name and version of the package you are creating.</p>
<p>The option <code>--tap</code> takes a tap as its argument and generates the formula in
the specified tap.</p></dd>
<dt><code>deps</code> [<code>--1</code>] [<code>-n</code>] [<code>--union</code>] [<code>--full-name</code>] [<code>--installed</code>] [<code>--include-build</code>] [<code>--include-optional</code>] [<code>--skip-recommended</code>] <var>formulae</var></dt><dd><p>Show dependencies for <var>formulae</var>. When given multiple formula arguments, <dt><code>deps</code> [<code>--1</code>] [<code>-n</code>] [<code>--union</code>] [<code>--full-name</code>] [<code>--installed</code>] [<code>--include-build</code>] [<code>--include-optional</code>] [<code>--skip-recommended</code>] <var>formulae</var></dt><dd><p>Show dependencies for <var>formulae</var>. When given multiple formula arguments,
show the intersection of dependencies for <var>formulae</var>.</p> show the intersection of dependencies for <var>formulae</var>.</p>
@ -149,8 +108,6 @@ and allow you to explicitly set the name and version of the package you are
installing.</p></dd> installing.</p></dd>
<dt class="flush"><code>doctor</code></dt><dd><p>Check your system for potential problems. Doctor exits with a non-zero status <dt class="flush"><code>doctor</code></dt><dd><p>Check your system for potential problems. Doctor exits with a non-zero status
if any problems are found.</p></dd> if any problems are found.</p></dd>
<dt class="flush"><code>edit</code></dt><dd><p>Open all of Homebrew for editing.</p></dd>
<dt><code>edit</code> <var>formula</var></dt><dd><p>Open <var>formula</var> in the editor.</p></dd>
<dt><code>fetch</code> [<code>--force</code>] [<code>--retry</code>] [<code>-v</code>] [<code>--devel</code>|<code>--HEAD</code>] [<code>--deps</code>] [<code>--build-from-source</code>|<code>--force-bottle</code>] <var>formulae</var></dt><dd><p>Download the source packages for the given <var>formulae</var>. <dt><code>fetch</code> [<code>--force</code>] [<code>--retry</code>] [<code>-v</code>] [<code>--devel</code>|<code>--HEAD</code>] [<code>--deps</code>] [<code>--build-from-source</code>|<code>--force-bottle</code>] <var>formulae</var></dt><dd><p>Download the source packages for the given <var>formulae</var>.
For tarballs, also print SHA-256 checksums.</p> For tarballs, also print SHA-256 checksums.</p>
@ -395,21 +352,6 @@ for <var>version</var> is <code>v1</code>.</p>
<dt><code>tap-pin</code> <var>tap</var></dt><dd><p>Pin <var>tap</var>, prioritizing its formulae over core when formula names are supplied <dt><code>tap-pin</code> <var>tap</var></dt><dd><p>Pin <var>tap</var>, prioritizing its formulae over core when formula names are supplied
by the user. See also <code>tap-unpin</code>.</p></dd> by the user. See also <code>tap-unpin</code>.</p></dd>
<dt><code>tap-unpin</code> <var>tap</var></dt><dd><p>Unpin <var>tap</var> so its formulae are no longer prioritized. See also <code>tap-pin</code>.</p></dd> <dt><code>tap-unpin</code> <var>tap</var></dt><dd><p>Unpin <var>tap</var> so its formulae are no longer prioritized. See also <code>tap-pin</code>.</p></dd>
<dt><code>test</code> [<code>--devel</code>|<code>--HEAD</code>] [<code>--debug</code>] [<code>--keep-tmp</code>] <var>formula</var></dt><dd><p>A few formulae provide a test method. <code>brew test</code> <var>formula</var> runs this
test method. There is no standard output or return code, but it should
generally indicate to the user if something is wrong with the installed
formula.</p>
<p>To test the development or head version of a formula, use <code>--devel</code> or
<code>--HEAD</code>.</p>
<p>If <code>--debug</code> is passed and the test fails, an interactive debugger will be
launched with access to IRB or a shell inside the temporary test directory.</p>
<p>If <code>--keep-tmp</code> is passed, the temporary files created for the test are
not deleted.</p>
<p>Example: <code>brew install jruby &amp;&amp; brew test jruby</code></p></dd>
<dt><code>uninstall</code>, <code>rm</code>, <code>remove</code> [<code>--force</code>] <var>formula</var></dt><dd><p>Uninstall <var>formula</var>.</p> <dt><code>uninstall</code>, <code>rm</code>, <code>remove</code> [<code>--force</code>] <var>formula</var></dt><dd><p>Uninstall <var>formula</var>.</p>
<p>If <code>--force</code> is passed, and there are multiple versions of <var>formula</var> <p>If <code>--force</code> is passed, and there are multiple versions of <var>formula</var>
@ -494,6 +436,156 @@ the <code>prefix</code> and <code>repository</code> are the same directory.</p><
</dl> </dl>
<h2 id="DEVELOPER-COMMANDS">DEVELOPER COMMANDS</h2>
<dl>
<dt><code>audit</code> [<code>--strict</code>] [<code>--online</code>] [<code>--new-formula</code>] [<code>--display-cop-names</code>] [<code>--display-filename</code>] [<var>formulae</var>]</dt><dd><p>Check <var>formulae</var> for Homebrew coding style violations. This should be
run before submitting a new formula.</p>
<p>If no <var>formulae</var> are provided, all of them are checked.</p>
<p>If <code>--strict</code> is passed, additional checks are run, including RuboCop
style checks.</p>
<p>If <code>--online</code> is passed, additional slower checks that require a network
connection are run.</p>
<p>If <code>--new-formula</code> is passed, various additional checks are run that check
if a new formula is eligable for Homebrew. This should be used when creating
new formulae and implies <code>--strict</code> and <code>--online</code>.</p>
<p>If <code>--display-cop-names</code> is passed, the RuboCop cop name for each violation
is included in the output.</p>
<p>If <code>--display-filename</code> is passed, every line of output is prefixed with the
name of the file or formula being audited, to make the output easy to grep.</p>
<p><code>audit</code> exits with a non-zero status if any errors are found. This is useful,
for instance, for implementing pre-commit hooks.</p></dd>
<dt><code>bottle</code> [<code>--verbose</code>] [<code>--no-rebuild</code>] [<code>--keep-old</code>] [<code>--skip-relocation</code>] [<code>--root-url=&lt;root_url></code>]:</dt><dd><p></p></dd>
<dt><code>bottle</code> <code>--merge</code> [<code>--no-commit</code>] [<code>--keep-old</code>] [<code>--write</code>]:</dt><dd><p></p>
<p>Generate a bottle (binary package) from a formula installed with
<code>--build-bottle</code>.</p></dd>
<dt><code>bump-formula-pr</code> [<code>--devel</code>] [<code>--dry-run</code>] [<code>--audit</code>|<code>--strict</code>] <code>--url=</code><var>url</var> <code>--sha256=</code><var>sha-256</var> <var>formula</var>:</dt><dd><p></p></dd>
<dt><code>bump-formula-pr</code> [<code>--devel</code>] [<code>--dry-run</code>] [<code>--audit</code>|<code>--strict</code>] <code>--tag=</code><var>tag</var> <code>--revision=</code><var>revision</var> <var>formula</var></dt><dd><p>Creates a pull request to update the formula with a new url or a new tag.</p>
<p>If a <var>url</var> is specified, the <var>sha-256</var> checksum of the new download must
also be specified.</p>
<p>If a <var>tag</var> is specified, the git commit <var>revision</var> corresponding to that
tag must also be specified.</p>
<p>If <code>--devel</code> is passed, bump the development rather than stable version.
The development spec must already exist.</p>
<p>If <code>--dry-run</code> is passed, print what would be done rather than doing it.</p>
<p>If <code>--audit</code> is passed, run <code>brew audit</code> before opening the PR.</p>
<p>If <code>--strict</code> is passed, run <code>brew audit --strict</code> before opening the PR.</p>
<p>Note that this command cannot be used to transition a formula from a
url-and-sha256 style specification into a tag-and-revision style
specification, nor vice versa. It must use whichever style specification
the preexisting formula already uses.</p></dd>
<dt><code>create</code> <var>URL</var> [<code>--autotools</code>|<code>--cmake</code>] [<code>--no-fetch</code>] [<code>--set-name</code> <var>name</var>] [<code>--set-version</code> <var>version</var>] [<code>--tap</code> <var>user</var><code>/</code><var>repo</var>]</dt><dd><p>Generate a formula for the downloadable file at <var>URL</var> 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 <code>wget</code>
formula serves as a simple example. For the complete API have a look at</p>
<p><a href="http://www.rubydoc.info/github/Homebrew/brew/master/Formula" data-bare-link="true">http://www.rubydoc.info/github/Homebrew/brew/master/Formula</a></p>
<p>If <code>--autotools</code> is passed, create a basic template for an Autotools-style build.
If <code>--cmake</code> is passed, create a basic template for a CMake-style build.</p>
<p>If <code>--no-fetch</code> is passed, Homebrew will not download <var>URL</var> to the cache and
will thus not add the SHA256 to the formula for you.</p>
<p>The options <code>--set-name</code> and <code>--set-version</code> each take an argument and allow
you to explicitly set the name and version of the package you are creating.</p>
<p>The option <code>--tap</code> takes a tap as its argument and generates the formula in
the specified tap.</p></dd>
<dt class="flush"><code>edit</code></dt><dd><p>Open all of Homebrew for editing.</p></dd>
<dt><code>edit</code> <var>formula</var></dt><dd><p>Open <var>formula</var> in the editor.</p></dd>
<dt><code>linkage</code> [<code>--test</code>] [<code>--reverse</code>] <var>formula-name</var></dt><dd><p>Checks the library links of an installed formula.</p>
<p>Only works on installed formulae. An error is raised if it is run on
uninstalled formulae.</p>
<p>If <code>--test</code> is passed, only display missing libraries and exit with a
non-zero exit code if any missing libraries were found.</p>
<p>If <code>--reverse</code> is passed, print the dylib followed by the binaries
which link to it for each library the keg references.</p></dd>
<dt class="flush"><code>man</code></dt><dd><p>Generate Homebrew's manpages.</p></dd>
</dl>
<p> <code>pull</code> [<code>--bottle</code>] [<code>--bump</code>] [<code>--clean</code>] [<code>--ignore-whitespace</code>] [<code>--resolve</code>] [<code>--branch-okay</code>] [<code>--no-pbcopy</code>] [<code>--no-publish</code>] <var>patch-source</var> [<var>patch-source</var>]</p>
<pre><code>Gets a patch from a GitHub commit or pull request and applies it to Homebrew.
Optionally, installs the formulae changed by the patch.
Each &lt;patch-source> may be one of:
* The ID number of a PR (Pull Request) in the homebrew/core GitHub
repository
* The URL of a PR on GitHub, using either the web page or API URL
formats. In this form, the PR may be on Homebrew/brew,
Homebrew/homebrew-core or any tap.
* The URL of a commit on GitHub
* A "http://bot.brew.sh/job/..." string specifying a testing job ID
</code></pre>
<p> If <code>--bottle</code> was passed, handle bottles, pulling the bottle-update
commit and publishing files on Bintray.
If <code>--bump</code> was passed, for one-formula PRs, automatically reword
commit message to our preferred format.
If <code>--clean</code> was passed, do not rewrite or otherwise modify the
commits found in the pulled PR.
If <code>--ignore-whitespace</code> was passed, silently ignore whitespace
discrepancies when applying diffs.
If <code>--resolve</code> was passed, when a patch fails to apply, leave in
progress and allow user to
resolve, instead of aborting.
If <code>--branch-okay</code> was passed, do not warn if pulling to a branch
besides master (useful for testing).
If <code>--no-pbcopy</code> was passed, do not copy anything to the system
If <code>--no-publish</code> was passed, do not publish bottles to Bintray.</p>
<dl>
<dt><code>tap_readme</code> [<code>-v</code>] <var>name</var></dt><dd><p>Generate the README.md file for a new tap.</p></dd>
<dt><code>test</code> [<code>--devel</code>|<code>--HEAD</code>] [<code>--debug</code>] [<code>--keep-tmp</code>] <var>formula</var></dt><dd><p>A few formulae provide a test method. <code>brew test</code> <var>formula</var> runs this
test method. There is no standard output or return code, but it should
generally indicate to the user if something is wrong with the installed
formula.</p>
<p>To test the development or head version of a formula, use <code>--devel</code> or
<code>--HEAD</code>.</p>
<p>If <code>--debug</code> is passed and the test fails, an interactive debugger will be
launched with access to IRB or a shell inside the temporary test directory.</p>
<p>If <code>--keep-tmp</code> is passed, the temporary files created for the test are
not deleted.</p>
<p>Example: <code>brew install jruby &amp;&amp; brew test jruby</code></p></dd>
<dt><code>tests</code> [<code>-v</code>] [<code>--coverage</code>] [<code>--generic</code>] [<code>--no-compat</code>] [<code>--only=</code><test_script/test_method>] [<code>--seed</code> <var>seed</var>] [<code>--trace</code>] [<code>--online</code>] [<code>--official-cmd-taps</code>]</dt><dd><p>Run Homebrew's unit and integration tests.</p></dd>
<dt><code>update-test</code> [<code>--commit=&lt;sha1></code>] [<code>--before=&lt;date></code>] [<code>--keep-tmp</code>]</dt><dd><p>Runs a test of <code>brew update</code> with a new repository clone.</p>
<p>If no arguments are passed, use <code>origin/master</code> as the start commit.</p>
<p>If <code>--commit=&lt;sha1></code> is passed, use <code>&lt;sha1></code> as the start commit.</p>
<p>If <code>--before=&lt;date></code> is passed, use the commit at <code>&lt;date></code> as the
start commit.</p>
<p>If <code>--keep-tmp</code> is passed, retain the temporary directory containing
the new repository clone.</p></dd>
</dl>
<h2 id="EXTERNAL-COMMANDS">EXTERNAL COMMANDS</h2> <h2 id="EXTERNAL-COMMANDS">EXTERNAL COMMANDS</h2>
<p>Homebrew, like <code>git</code>(1), supports external commands. These are executable <p>Homebrew, like <code>git</code>(1), supports external commands. These are executable

View File

@ -56,31 +56,6 @@ Turn on/off Homebrew\'s analytics\.
Regenerate UUID used in Homebrew\'s analytics\. Regenerate UUID used in Homebrew\'s analytics\.
. .
.TP .TP
\fBaudit\fR [\fB\-\-strict\fR] [\fB\-\-online\fR] [\fB\-\-new\-formula\fR] [\fB\-\-display\-cop\-names\fR] [\fB\-\-display\-filename\fR] [\fIformulae\fR]
Check \fIformulae\fR for Homebrew coding style violations\. This should be run before submitting a new formula\.
.
.IP
If no \fIformulae\fR are provided, all of them are checked\.
.
.IP
If \fB\-\-strict\fR is passed, additional checks are run, including RuboCop style checks\.
.
.IP
If \fB\-\-online\fR is passed, additional slower checks that require a network connection are run\.
.
.IP
If \fB\-\-new\-formula\fR is passed, various additional checks are run that check if a new formula is eligable for Homebrew\. This should be used when creating new formulae and implies \fB\-\-strict\fR and \fB\-\-online\fR\.
.
.IP
If \fB\-\-display\-cop\-names\fR is passed, the RuboCop cop name for each violation is included in the output\.
.
.IP
If \fB\-\-display\-filename\fR is passed, every line of output is prefixed with the name of the file or formula being audited, to make the output easy to grep\.
.
.IP
\fBaudit\fR exits with a non\-zero status if any errors are found\. This is useful, for instance, for implementing pre\-commit hooks\.
.
.TP
\fBcat\fR \fIformula\fR \fBcat\fR \fIformula\fR
Display the source to \fIformula\fR\. Display the source to \fIformula\fR\.
. .
@ -113,25 +88,6 @@ If \fB\-\-quiet\fR is passed, list only the names of commands without the header
Show Homebrew and system configuration useful for debugging\. If you file a bug report, you will likely be asked for this information if you do not provide it\. Show Homebrew and system configuration useful for debugging\. If you file a bug report, you will likely be asked for this information if you do not provide it\.
. .
.TP .TP
\fBcreate\fR \fIURL\fR [\fB\-\-autotools\fR|\fB\-\-cmake\fR] [\fB\-\-no\-fetch\fR] [\fB\-\-set\-name\fR \fIname\fR] [\fB\-\-set\-version\fR \fIversion\fR] [\fB\-\-tap\fR \fIuser\fR\fB/\fR\fIrepo\fR]
Generate a formula for the downloadable file at \fIURL\fR 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 \fBwget\fR formula serves as a simple example\. For the complete API have a look at
.
.IP
\fIhttp://www\.rubydoc\.info/github/Homebrew/brew/master/Formula\fR
.
.IP
If \fB\-\-autotools\fR is passed, create a basic template for an Autotools\-style build\. If \fB\-\-cmake\fR is passed, create a basic template for a CMake\-style build\.
.
.IP
If \fB\-\-no\-fetch\fR is passed, Homebrew will not download \fIURL\fR to the cache and will thus not add the SHA256 to the formula for you\.
.
.IP
The options \fB\-\-set\-name\fR and \fB\-\-set\-version\fR each take an argument and allow you to explicitly set the name and version of the package you are creating\.
.
.IP
The option \fB\-\-tap\fR takes a tap as its argument and generates the formula in the specified tap\.
.
.TP
\fBdeps\fR [\fB\-\-1\fR] [\fB\-n\fR] [\fB\-\-union\fR] [\fB\-\-full\-name\fR] [\fB\-\-installed\fR] [\fB\-\-include\-build\fR] [\fB\-\-include\-optional\fR] [\fB\-\-skip\-recommended\fR] \fIformulae\fR \fBdeps\fR [\fB\-\-1\fR] [\fB\-n\fR] [\fB\-\-union\fR] [\fB\-\-full\-name\fR] [\fB\-\-installed\fR] [\fB\-\-include\-build\fR] [\fB\-\-include\-optional\fR] [\fB\-\-skip\-recommended\fR] \fIformulae\fR
Show dependencies for \fIformulae\fR\. When given multiple formula arguments, show the intersection of dependencies for \fIformulae\fR\. Show dependencies for \fIformulae\fR\. When given multiple formula arguments, show the intersection of dependencies for \fIformulae\fR\.
. .
@ -193,14 +149,6 @@ The options \fB\-\-name=\fR\fIname\fR and \fB\-\-version=\fR\fIversion\fR each t
Check your system for potential problems\. Doctor exits with a non\-zero status if any problems are found\. Check your system for potential problems\. Doctor exits with a non\-zero status if any problems are found\.
. .
.TP .TP
\fBedit\fR
Open all of Homebrew for editing\.
.
.TP
\fBedit\fR \fIformula\fR
Open \fIformula\fR in the editor\.
.
.TP
\fBfetch\fR [\fB\-\-force\fR] [\fB\-\-retry\fR] [\fB\-v\fR] [\fB\-\-devel\fR|\fB\-\-HEAD\fR] [\fB\-\-deps\fR] [\fB\-\-build\-from\-source\fR|\fB\-\-force\-bottle\fR] \fIformulae\fR \fBfetch\fR [\fB\-\-force\fR] [\fB\-\-retry\fR] [\fB\-v\fR] [\fB\-\-devel\fR|\fB\-\-HEAD\fR] [\fB\-\-deps\fR] [\fB\-\-build\-from\-source\fR|\fB\-\-force\-bottle\fR] \fIformulae\fR
Download the source packages for the given \fIformulae\fR\. For tarballs, also print SHA\-256 checksums\. Download the source packages for the given \fIformulae\fR\. For tarballs, also print SHA\-256 checksums\.
. .
@ -542,22 +490,6 @@ Pin \fItap\fR, prioritizing its formulae over core when formula names are suppli
Unpin \fItap\fR so its formulae are no longer prioritized\. See also \fBtap\-pin\fR\. Unpin \fItap\fR so its formulae are no longer prioritized\. See also \fBtap\-pin\fR\.
. .
.TP .TP
\fBtest\fR [\fB\-\-devel\fR|\fB\-\-HEAD\fR] [\fB\-\-debug\fR] [\fB\-\-keep\-tmp\fR] \fIformula\fR
A few formulae provide a test method\. \fBbrew test\fR \fIformula\fR runs this test method\. There is no standard output or return code, but it should generally indicate to the user if something is wrong with the installed formula\.
.
.IP
To test the development or head version of a formula, use \fB\-\-devel\fR or \fB\-\-HEAD\fR\.
.
.IP
If \fB\-\-debug\fR is passed and the test fails, an interactive debugger will be launched with access to IRB or a shell inside the temporary test directory\.
.
.IP
If \fB\-\-keep\-tmp\fR is passed, the temporary files created for the test are not deleted\.
.
.IP
Example: \fBbrew install jruby && brew test jruby\fR
.
.TP
\fBuninstall\fR, \fBrm\fR, \fBremove\fR [\fB\-\-force\fR] \fIformula\fR \fBuninstall\fR, \fBrm\fR, \fBremove\fR [\fB\-\-force\fR] \fIformula\fR
Uninstall \fIformula\fR\. Uninstall \fIformula\fR\.
. .
@ -684,6 +616,182 @@ Display where tap \fIuser\fR\fB/\fR\fIrepo\fR\'s directory is located\.
\fB\-\-version\fR \fB\-\-version\fR
Print the version number of Homebrew to standard output and exit\. Print the version number of Homebrew to standard output and exit\.
. .
.SH "DEVELOPER COMMANDS"
.
.TP
\fBaudit\fR [\fB\-\-strict\fR] [\fB\-\-online\fR] [\fB\-\-new\-formula\fR] [\fB\-\-display\-cop\-names\fR] [\fB\-\-display\-filename\fR] [\fIformulae\fR]
Check \fIformulae\fR for Homebrew coding style violations\. This should be run before submitting a new formula\.
.
.IP
If no \fIformulae\fR are provided, all of them are checked\.
.
.IP
If \fB\-\-strict\fR is passed, additional checks are run, including RuboCop style checks\.
.
.IP
If \fB\-\-online\fR is passed, additional slower checks that require a network connection are run\.
.
.IP
If \fB\-\-new\-formula\fR is passed, various additional checks are run that check if a new formula is eligable for Homebrew\. This should be used when creating new formulae and implies \fB\-\-strict\fR and \fB\-\-online\fR\.
.
.IP
If \fB\-\-display\-cop\-names\fR is passed, the RuboCop cop name for each violation is included in the output\.
.
.IP
If \fB\-\-display\-filename\fR is passed, every line of output is prefixed with the name of the file or formula being audited, to make the output easy to grep\.
.
.IP
\fBaudit\fR exits with a non\-zero status if any errors are found\. This is useful, for instance, for implementing pre\-commit hooks\.
.
.TP
\fBbottle\fR [\fB\-\-verbose\fR] [\fB\-\-no\-rebuild\fR] [\fB\-\-keep\-old\fR] [\fB\-\-skip\-relocation\fR] [\fB\-\-root\-url=<root_url>\fR]:
.
.TP
\fBbottle\fR \fB\-\-merge\fR [\fB\-\-no\-commit\fR] [\fB\-\-keep\-old\fR] [\fB\-\-write\fR]:
.
.IP
Generate a bottle (binary package) from a formula installed with \fB\-\-build\-bottle\fR\.
.
.TP
\fBbump\-formula\-pr\fR [\fB\-\-devel\fR] [\fB\-\-dry\-run\fR] [\fB\-\-audit\fR|\fB\-\-strict\fR] \fB\-\-url=\fR\fIurl\fR \fB\-\-sha256=\fR\fIsha\-256\fR \fIformula\fR:
.
.TP
\fBbump\-formula\-pr\fR [\fB\-\-devel\fR] [\fB\-\-dry\-run\fR] [\fB\-\-audit\fR|\fB\-\-strict\fR] \fB\-\-tag=\fR\fItag\fR \fB\-\-revision=\fR\fIrevision\fR \fIformula\fR
Creates a pull request to update the formula with a new url or a new tag\.
.
.IP
If a \fIurl\fR is specified, the \fIsha\-256\fR checksum of the new download must also be specified\.
.
.IP
If a \fItag\fR is specified, the git commit \fIrevision\fR corresponding to that tag must also be specified\.
.
.IP
If \fB\-\-devel\fR is passed, bump the development rather than stable version\. The development spec must already exist\.
.
.IP
If \fB\-\-dry\-run\fR is passed, print what would be done rather than doing it\.
.
.IP
If \fB\-\-audit\fR is passed, run \fBbrew audit\fR before opening the PR\.
.
.IP
If \fB\-\-strict\fR is passed, run \fBbrew audit \-\-strict\fR before opening the PR\.
.
.IP
Note that this command cannot be used to transition a formula from a url\-and\-sha256 style specification into a tag\-and\-revision style specification, nor vice versa\. It must use whichever style specification the preexisting formula already uses\.
.
.TP
\fBcreate\fR \fIURL\fR [\fB\-\-autotools\fR|\fB\-\-cmake\fR] [\fB\-\-no\-fetch\fR] [\fB\-\-set\-name\fR \fIname\fR] [\fB\-\-set\-version\fR \fIversion\fR] [\fB\-\-tap\fR \fIuser\fR\fB/\fR\fIrepo\fR]
Generate a formula for the downloadable file at \fIURL\fR 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 \fBwget\fR formula serves as a simple example\. For the complete API have a look at
.
.IP
\fIhttp://www\.rubydoc\.info/github/Homebrew/brew/master/Formula\fR
.
.IP
If \fB\-\-autotools\fR is passed, create a basic template for an Autotools\-style build\. If \fB\-\-cmake\fR is passed, create a basic template for a CMake\-style build\.
.
.IP
If \fB\-\-no\-fetch\fR is passed, Homebrew will not download \fIURL\fR to the cache and will thus not add the SHA256 to the formula for you\.
.
.IP
The options \fB\-\-set\-name\fR and \fB\-\-set\-version\fR each take an argument and allow you to explicitly set the name and version of the package you are creating\.
.
.IP
The option \fB\-\-tap\fR takes a tap as its argument and generates the formula in the specified tap\.
.
.TP
\fBedit\fR
Open all of Homebrew for editing\.
.
.TP
\fBedit\fR \fIformula\fR
Open \fIformula\fR in the editor\.
.
.TP
\fBlinkage\fR [\fB\-\-test\fR] [\fB\-\-reverse\fR] \fIformula\-name\fR
Checks the library links of an installed formula\.
.
.IP
Only works on installed formulae\. An error is raised if it is run on uninstalled formulae\.
.
.IP
If \fB\-\-test\fR is passed, only display missing libraries and exit with a non\-zero exit code if any missing libraries were found\.
.
.IP
If \fB\-\-reverse\fR is passed, print the dylib followed by the binaries which link to it for each library the keg references\.
.
.TP
\fBman\fR
Generate Homebrew\'s manpages\.
.
.P
\fBpull\fR [\fB\-\-bottle\fR] [\fB\-\-bump\fR] [\fB\-\-clean\fR] [\fB\-\-ignore\-whitespace\fR] [\fB\-\-resolve\fR] [\fB\-\-branch\-okay\fR] [\fB\-\-no\-pbcopy\fR] [\fB\-\-no\-publish\fR] \fIpatch\-source\fR [\fIpatch\-source\fR]
.
.IP "" 4
.
.nf
Gets a patch from a GitHub commit or pull request and applies it to Homebrew\.
Optionally, installs the formulae changed by the patch\.
Each <patch\-source> may be one of:
* The ID number of a PR (Pull Request) in the homebrew/core GitHub
repository
* The URL of a PR on GitHub, using either the web page or API URL
formats\. In this form, the PR may be on Homebrew/brew,
Homebrew/homebrew\-core or any tap\.
* The URL of a commit on GitHub
* A "http://bot\.brew\.sh/job/\.\.\." string specifying a testing job ID
.
.fi
.
.IP "" 0
.
.P
If \fB\-\-bottle\fR was passed, handle bottles, pulling the bottle\-update commit and publishing files on Bintray\. If \fB\-\-bump\fR was passed, for one\-formula PRs, automatically reword commit message to our preferred format\. If \fB\-\-clean\fR was passed, do not rewrite or otherwise modify the commits found in the pulled PR\. If \fB\-\-ignore\-whitespace\fR was passed, silently ignore whitespace discrepancies when applying diffs\. If \fB\-\-resolve\fR was passed, when a patch fails to apply, leave in progress and allow user to resolve, instead of aborting\. If \fB\-\-branch\-okay\fR was passed, do not warn if pulling to a branch besides master (useful for testing)\. If \fB\-\-no\-pbcopy\fR was passed, do not copy anything to the system If \fB\-\-no\-publish\fR was passed, do not publish bottles to Bintray\.
.
.TP
\fBtap_readme\fR [\fB\-v\fR] \fIname\fR
Generate the README\.md file for a new tap\.
.
.TP
\fBtest\fR [\fB\-\-devel\fR|\fB\-\-HEAD\fR] [\fB\-\-debug\fR] [\fB\-\-keep\-tmp\fR] \fIformula\fR
A few formulae provide a test method\. \fBbrew test\fR \fIformula\fR runs this test method\. There is no standard output or return code, but it should generally indicate to the user if something is wrong with the installed formula\.
.
.IP
To test the development or head version of a formula, use \fB\-\-devel\fR or \fB\-\-HEAD\fR\.
.
.IP
If \fB\-\-debug\fR is passed and the test fails, an interactive debugger will be launched with access to IRB or a shell inside the temporary test directory\.
.
.IP
If \fB\-\-keep\-tmp\fR is passed, the temporary files created for the test are not deleted\.
.
.IP
Example: \fBbrew install jruby && brew test jruby\fR
.
.TP
\fBtests\fR [\fB\-v\fR] [\fB\-\-coverage\fR] [\fB\-\-generic\fR] [\fB\-\-no\-compat\fR] [\fB\-\-only=\fR<test_script/test_method>] [\fB\-\-seed\fR \fIseed\fR] [\fB\-\-trace\fR] [\fB\-\-online\fR] [\fB\-\-official\-cmd\-taps\fR]
Run Homebrew\'s unit and integration tests\.
.
.TP
\fBupdate\-test\fR [\fB\-\-commit=<sha1>\fR] [\fB\-\-before=<date>\fR] [\fB\-\-keep\-tmp\fR]
Runs a test of \fBbrew update\fR with a new repository clone\.
.
.IP
If no arguments are passed, use \fBorigin/master\fR as the start commit\.
.
.IP
If \fB\-\-commit=<sha1>\fR is passed, use \fB<sha1>\fR as the start commit\.
.
.IP
If \fB\-\-before=<date>\fR is passed, use the commit at \fB<date>\fR as the start commit\.
.
.IP
If \fB\-\-keep\-tmp\fR is passed, retain the temporary directory containing the new repository clone\.
.
.SH "EXTERNAL COMMANDS" .SH "EXTERNAL COMMANDS"
Homebrew, like \fBgit\fR(1), supports external commands\. These are executable scripts that reside somewhere in the \fBPATH\fR, named \fBbrew\-\fR\fIcmdname\fR or \fBbrew\-\fR\fIcmdname\fR\fB\.rb\fR, which can be invoked like \fBbrew\fR \fIcmdname\fR\. This allows you to create your own commands without modifying Homebrew\'s internals\. Homebrew, like \fBgit\fR(1), supports external commands\. These are executable scripts that reside somewhere in the \fBPATH\fR, named \fBbrew\-\fR\fIcmdname\fR or \fBbrew\-\fR\fIcmdname\fR\fB\.rb\fR, which can be invoked like \fBbrew\fR \fIcmdname\fR\. This allows you to create your own commands without modifying Homebrew\'s internals\.
. .