From 44eeb597742312a2a7b01dc016e433f04074a1c3 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 23 Jul 2018 14:51:47 +0100 Subject: [PATCH] bottle: add --json and --merge docs. Fixes #4519. --- Library/Homebrew/dev-cmd/bottle.rb | 15 +++++++-------- docs/Manpage.md | 11 +++++++---- manpages/brew.1 | 9 ++++++--- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index 6fe0134468..c6858d8096 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -1,4 +1,4 @@ -#: * `bottle` [`--verbose`] [`--no-rebuild`|`--keep-old`] [`--skip-relocation`] [`--or-later`] [`--root-url=`] [`--force-core-tap`] : +#: * `bottle` [`--verbose`] [`--no-rebuild`|`--keep-old`] [`--skip-relocation`] [`--or-later`] [`--root-url=`] [`--force-core-tap`] [`--json`] : #: Generate a bottle (binary package) from a formula installed with #: `--build-bottle`. #: @@ -20,17 +20,16 @@ #: If `--force-core-tap` is passed, build a bottle even if is not #: in homebrew/core or any installed taps. #: -#: * `bottle` `--merge` [`--keep-old`] [`--write` [`--no-commit`]] : -#: Generate a bottle from a formula and print the new DSL merged into the -#: existing formula. +#: If `--json` is passed, write bottle information to a JSON file, which can +#: be used as the argument for `--merge`. +#: +#: * `bottle` `--merge` [`--keep-old`] [`--write` [`--no-commit`]] : +#: Generate a bottle from a `--json` output file and print the new DSL merged +#: into the existing formula. #: #: If `--write` is passed, write the changes to the formula file. A new #: commit will then be generated unless `--no-commit` is passed. -# Undocumented options: -# `--json` writes bottle information to a JSON file, which can be used as -# the argument for `--merge`. - require "formula" require "utils/bottles" require "tab" diff --git a/docs/Manpage.md b/docs/Manpage.md index 55f5babd79..8b79152b3a 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -687,7 +687,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note `audit` exits with a non-zero status if any errors are found. This is useful, for instance, for implementing pre-commit hooks. - * `bottle` [`--verbose`] [`--no-rebuild`|`--keep-old`] [`--skip-relocation`] [`--or-later`] [`--root-url=``URL`] [`--force-core-tap`] `formulae`: + * `bottle` [`--verbose`] [`--no-rebuild`|`--keep-old`] [`--skip-relocation`] [`--or-later`] [`--root-url=``URL`] [`--force-core-tap`] [`--json`] `formulae`: Generate a bottle (binary package) from a formula installed with `--build-bottle`. @@ -709,9 +709,12 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note If `--force-core-tap` is passed, build a bottle even if `formula` is not in homebrew/core or any installed taps. - * `bottle` `--merge` [`--keep-old`] [`--write` [`--no-commit`]] `formulae`: - Generate a bottle from a formula and print the new DSL merged into the - existing formula. + If `--json` is passed, write bottle information to a JSON file, which can + be used as the argument for `--merge`. + + * `bottle` `--merge` [`--keep-old`] [`--write` [`--no-commit`]] `bottle_json_files`: + Generate a bottle from a `--json` output file and print the new DSL merged + into the existing formula. If `--write` is passed, write the changes to the formula file. A new commit will then be generated unless `--no-commit` is passed. diff --git a/manpages/brew.1 b/manpages/brew.1 index 879169d77e..b13753248b 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -628,7 +628,7 @@ Passing \fB\-\-only\-cops=\fR\fIcops\fR will check for violations of only the li \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\-\-or\-later\fR] [\fB\-\-root\-url=\fR\fIURL\fR] [\fB\-\-force\-core\-tap\fR] \fIformulae\fR +\fBbottle\fR [\fB\-\-verbose\fR] [\fB\-\-no\-rebuild\fR|\fB\-\-keep\-old\fR] [\fB\-\-skip\-relocation\fR] [\fB\-\-or\-later\fR] [\fB\-\-root\-url=\fR\fIURL\fR] [\fB\-\-force\-core\-tap\fR] [\fB\-\-json\fR] \fIformulae\fR Generate a bottle (binary package) from a formula installed with \fB\-\-build\-bottle\fR\. . .IP @@ -649,9 +649,12 @@ If \fB\-\-or\-later\fR is passed, append _or_later to the bottle tag\. .IP If \fB\-\-force\-core\-tap\fR is passed, build a bottle even if \fIformula\fR is not in homebrew/core or any installed taps\. . +.IP +If \fB\-\-json\fR is passed, write bottle information to a JSON file, which can be used as the argument for \fB\-\-merge\fR\. +. .TP -\fBbottle\fR \fB\-\-merge\fR [\fB\-\-keep\-old\fR] [\fB\-\-write\fR [\fB\-\-no\-commit\fR]] \fIformulae\fR -Generate a bottle from a formula and print the new DSL merged into the existing formula\. +\fBbottle\fR \fB\-\-merge\fR [\fB\-\-keep\-old\fR] [\fB\-\-write\fR [\fB\-\-no\-commit\fR]] \fIbottle_json_files\fR +Generate a bottle from a \fB\-\-json\fR output file and print the new DSL merged into the existing formula\. . .IP If \fB\-\-write\fR is passed, write the changes to the formula file\. A new commit will then be generated unless \fB\-\-no\-commit\fR is passed\.