69 Commits
Author SHA1 Message Date
nandahkrishna 8e5451df2f style: use parentheses for assignment in conditions 2021-02-12 18:33:37 +05:30
EricFromCanada 2ed324ebc0 use backticks around suggested input, flags, and binaries 2021-01-26 16:19:47 -05:00
EricFromCanada cd3cb6928b indent suggested commands on subsequent line
and combine sequential puts calls
2021-01-26 15:36:44 -05:00
EricFromCanada 2e982cd2a2 use odie when commands encounter errors 2021-01-26 15:36:43 -05:00
Rylan Polster d1f3e39b7b Update commands to generate usage banner 2021-01-18 21:20:11 -05:00
Rylan Polster da811373d3 Add named_args DSL for commands 2021-01-13 17:09:42 -05:00
Markus Reiter da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Mike McQuaid 878cbb634f update-test: more improvements.
- Explain why `HOMEBREW_UPDATE_TEST` is set and what it does.
- Avoid auto-updating (this should already be not happening but let's
  make sure).
- Set environment variables to ensure we're testing the default update
  behaviour (rather than deferring to user configuration).
- Use `HOMEBREW_BREW_GIT_REMOTE` as well as setting
  `git config remote.origin.url` ourselves.
- Run `brew help` quietly first to hide irrelevant portable Ruby output.
- Run `brew update --verbose --debug` to get even more output on
  failure.

Fixes https://github.com/Homebrew/brew/issues/8979
2020-11-04 13:22:59 +00:00
Mike McQuaid 1702b34f18 update-test: improve debugging output.
Output more information about the refs and commit message for the start,
expected and actual end commits to ease debugging.
2020-10-26 12:17:22 +00:00
Markus Reiter 24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Markus Reiter d4c2ffd705 Refactor CLI::Parser. 2020-07-31 15:07:17 +02:00
Markus Reiter 6b0b25cd00 Pass keep_tmp? and interactive? instead of using global args. 2020-07-25 02:37:10 +02:00
Gautham GandMike McQuaid badcaa15e4 ARGV: Deprecate ARGV.keep_tmp? 2020-03-15 13:24:48 +00:00
EricFromCanada aea6d79d21 option parser: check for extra named args 2019-12-15 00:04:45 -05:00
EricFromCanada 2f7c3afeb8 cmd: improve wording of messages, spacing 2019-12-15 00:04:45 -05:00
Issy Long 02524ba322 Remove --local from git config commands as it's the default
- The `--local` option doesn't exist in early versions of git (~1.7),
  but its behaviour is the default (saving in the current repo's .git
  directory).
- As it's the default across versions, we don't need to specify it
  everywhere.
- Reported in Linuxbrew/install issue 78.
2019-11-16 10:19:42 +00:00
Mike McQuaidandGitHub c1960b2fd6 Merge branch 'master' into man-page-text 2019-08-20 14:42:24 +01:00
EricFromCanada 8a8359cdd4 manpages: sentence rewording for readability
Use active voice when applicable, better verbs & adjectives, preposition usage, proper tense, etc.
2019-08-20 09:05:45 -04:00
EricFromCanada b4303cd983 manpages: fix command & option descriptions 2019-08-20 09:03:33 -04:00
Mike McQuaid 86538a444a dev-cmd/update-test: various consistency fixes. 2019-08-19 20:38:19 +01:00
Mike McQuaid c4f72312ce Fixup brew style failures. 2019-04-30 09:19:18 +01:00
Mike McQuaid 36dbad3922 Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid e40b171127 Rename cli_parser to cli/parser. 2019-04-17 22:16:50 +09:00
EricFromCanada 89f0fcedbe whitespace fixes 2019-04-13 21:32:04 -04:00
Mike McQuaid bbea109926 dev-cmd: remove --help headers and tweak docs. 2019-01-30 21:39:28 +00:00
Jonathan Chang 1e57725e8f update-test: fix for mkdir block form 2018-12-27 13:09:14 -08:00
EricFromCanada 388781f6a7 dev-cmd/: remove colons from command specs.
These aren't needed when converting Parser-based help text to man page or Markdown formats.
Includes regenerated docs.
2018-10-19 13:12:55 -04:00
EricFromCanada ddf057f3dd dev-cmd/: edit help text and descriptions. 2018-10-19 13:12:11 -04:00
Markus Reiter c4d418e126 Use ActiveSupport’s #second. 2018-10-07 23:10:56 +02:00
Gautham Goli a03d2e0cd1 man: Correct option synopsis 2018-10-03 19:49:46 +05:30
Gautham Goli f60582ca48 man: Remove [] from command synopsis 2018-10-03 19:49:45 +05:30
Gautham Goli 446b1cb9e3 man: Seperate global options into a section 2018-10-03 19:49:45 +05:30
Gautham Goli e0e876cf37 man: Make command heading H3 2018-10-03 19:49:44 +05:30
Gautham Goli 4f58f2db99 man: Generate dev cmd manpages 2018-10-03 19:49:41 +05:30
Gautham Goli b6c456b681 Extract out arg parsing method to <cmd>_args method 2018-10-03 19:19:04 +05:30
Mike McQuaid f46e4596c0 Cleanup HOMEBREW_TEMP handling
- Ensure that `HOMEBREW_TEMP` is only displayed in `brew config` when
  it's non-default.
- Attempt to create a missing `HOMEBREW_TEMP` directory rather than
  failing to `realpath`. Note this will still fail on permissions errors
  which is to be expected.
2018-07-03 15:41:33 +01:00
Gautham Goli fba52e2f74 cli_parser: Store parsed args in Homebrew.args and access args everywhere else 2018-05-30 00:05:39 +05:30
Gautham Goli 48aecf2fa7 cli_parser: Refactor required argument for flag to '=' 2018-04-14 19:04:24 +05:30
Gautham Goli d22b750e17 Store common switch as Homebrew.args global var 2018-04-10 00:00:35 +05:30
Gautham Goli 92263f51e9 update-test: Use Parser to parse args 2018-03-25 21:39:02 +05:30
Markus Reiter 9bee9ca575 Use “squiggly” heredocs. 2017-10-18 14:39:09 +02:00
Markus Reiter 7cadff0a33 Use PATH where possible. 2017-09-29 22:18:24 +02:00
Mike McQuaid bcca2a7c6b brew: handle Ruby 2.3 more gracefully.
- `brew.rb` needed updated to fail unless on Ruby 2.3
- `brew update` should unset `HOMEBREW_RUBY_PATH` to ensure that this
  doesn't "stick" on a Ruby 2.0 version after a portable Ruby has been
  installed.
2017-09-29 19:53:50 +01:00
Mike McQuaid d7e2d5be36 update-test: tweak more edge cases.
Don't try to `fetch --depth=1` unless we've confirmed the repository is
already shallow. Otherwise this can discard history from a full clone.

Additionally, if the repository wasn't shallow but there's no tags found
assume that Git is too old and try a naive sort if on Linux where `sort`
is able to sort versions.
2017-05-29 15:13:08 +01:00
Mike McQuaid 224d2c21ca update-test: improve no tags found messaging.
Currently you just get `Could not find start commit!` which is not as
explicit as it could be.
2017-05-29 10:06:04 +01:00
Shaun Jackman 89f3b6d6a6 update-test: Use git fetch --tags --depth=1
Use git fetch --tags --depth=1 to fetch fewer commits.
2017-03-28 09:36:50 -07:00
Mike McQuaid c3bf9bda58 update-test: improve error handling.
Fail if the start or end commit are missing and retry finding the
previous tag by fetching all tags if they are missing.

This should fix CI on the current Homebrew/brew `master` branch.

Closes #2404.
2017-03-28 15:31:16 +01:00
EricFromCanada aee23ccb03 Add more flags and descriptions to man pages. 2017-03-05 21:45:15 -05:00
EricFromCanada afc539f86e Update brew's man page formatting and grammar
Also update command specifications to match descriptions.
2017-02-25 17:37:57 -05:00
Mike McQuaid 59933f5cd9 update-test: fix --to-tag failure on new tag.
Without this updating to a tag will always have the same start commit
and end commit as there's been no updates to `master` since the tag was
created.
2016-10-29 09:09:00 -04:00