243 Commits

Author SHA1 Message Date
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Dawid Dziurla
e3b472380d
bump-formula-pr: remove trailing '=' from --mirror in help message 2020-03-23 10:59:27 +01:00
Issy Long
202cc04456
Merge pull request #7165 from dawidd6/bump-version-equal
bump-formula-pr: ignore --version argument if equal to detected version
2020-03-15 11:04:52 +00:00
Mike McQuaid
1e265247ca
rubocop: apply autofixes. 2020-03-13 21:16:18 +00:00
Dawid Dziurla
8db863ff7e
bump-formula-pr: ignore --version argument if equal to detected version 2020-03-13 17:09:58 +01:00
Mike McQuaid
e3ac94fc5d
dev-cmd: use more and cleanup new args APIs. 2020-03-05 09:40:15 +00:00
Mike McQuaid
10ba0d5a66
Merge pull request #7092 from dawidd6/bump-push-with-token
bump-formula-pr: return remote url with token in it
2020-03-02 18:42:57 +00:00
Dawid Dziurla
456f3b1923
bump-formula-pr: return remote url with token in it 2020-03-02 18:50:42 +01:00
EricFromCanada
b80af7837a bump-formula-pr: add missing URL escapes 2020-02-28 13:02:55 -05:00
EricFromCanada
6f5cd0e7fe bump-formula-pr: support add multiple mirror URLs with --mirror 2020-02-24 13:07:46 -05:00
EricFromCanada
a24477dad6 bump-formula-pr: fix output when listing guesses 2020-02-24 13:07:46 -05:00
EricFromCanada
7ec2ffda93 bump-formula-pr: warn when removing mirrors 2020-02-24 13:07:46 -05:00
EricFromCanada
0132b905bf bump-formula-pr: automatically mirror Apache & GNU projects 2020-02-24 13:07:46 -05:00
EricFromCanada
50cc9db0f2 bump-formula-pr: also infer mirrors when a checksum is provided 2020-02-24 13:07:46 -05:00
Issy Long
1ab843ba47
bump-formula-pr: Only delete Linux bottle line if it exists
- We have some Linux-only formulae that don't have bottles.
- Previously, bumping a Linux-only formula that didn't have a bottle
  line - eg, `adoptopenjdk` which is `bottle :unneeded` - would fail:

```
Error: inreplace failed
/app/linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/adoptopenjdk.rb:

expected replacement of /^    sha256 ".+" => :x86_64_linux\n/m with "\2"
```
2020-02-14 22:41:31 +00:00
Issy Long
1df8584d13
bump-formula-pr: Determine Linux-only formulae with depends_on :linux
- We used to use `# tag "linux"` in Homebrew/linuxbrew-core for the ~50
  Linux-only formulae. As of
  6578a4aa86,
  we're using `depends_on :linux` to have a consistent syntax between
  Linux and macOS.
- Therefore, we have to change the search string for Linux-only formulae
  that determines whether or not `brew bump-formula-pr` deletes the bottle
  line.
2020-02-13 21:28:12 +00:00
Dawid Dziurla
359dc9674c
bump-formula-pr: delete linux sha256 line if required
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2020-01-18 15:27:40 +01: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
Gautham Goli
22e25dd593 argv: move formulae to cli/args 2019-12-11 16:36:23 +05:30
Mike McQuaid
40c6fbdccf
bump-formula-pr: tweak fix syntax. 2019-12-07 11:27:27 +00:00
Fred Emmott
3339d5af32
Fix bump-formula-pr on a file with no tap
fixes #6821
2019-12-06 11:10:01 -08:00
Maxim Belkin
5ba5a2795e
Fix signature for forked_repo_info 2019-11-26 12:14:21 -06:00
Maxim Belkin
40b0b32a72
Revert "bump-formula-pr: fix forking logic"
This reverts commit c5da90e0eb2ade879d7e60a0ec6a193aad3f8afb.
2019-11-26 12:10:14 -06:00
Dawid Dziurla
c5da90e0eb
bump-formula-pr: fix forking logic 2019-11-23 14:08:28 +01:00
Maxim Belkin
1a0361a57d
Don't check dry run status where it is not needed 2019-11-21 11:13:10 -06:00
Maxim Belkin
ba7a05a919
bump-formula-pr.rb: Apply suggestions from code review
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2019-11-21 11:13:10 -06:00
Maxim Belkin
a031fe911e
Switch from formula.tap.full_name to tap_formula_name 2019-11-21 11:13:10 -06:00
Maxim Belkin
845f65b945
Factor out some code into functions 2019-11-21 11:13:10 -06:00
Maxim Belkin
620e96b929
bump-formula-pr: enable same-repo (no-fork) Pull Requests 2019-11-21 11:13:09 -06: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
Dawid Dziurla
f90612ccf0
bump-formula-pr: make it usable on linux
This commit makes it possible to use `bump-formula-pr` on linux to
contribute to `homebrew-core` as easily as it is on macOS, but with some
additional steps made before actual bumping of the formula.

Differences in the process (before bumping):
- add `homebrew-core` remote named `homebrew`
- fetch `homebrew/master`
- check if formula exists in `homebrew-core`
- switch to `homebrew/master` ref
2019-11-15 13:22:31 +01:00
Issy Long
1f6168fe8a
Change regexp.match?(string) to string.match?(regexp) everywhere
- Only try to call `.match?` on strings that aren't nil.
2019-10-13 23:22:51 +01:00
Issy Long
b78028b9c2
Auto-fix Performance/RegexpMatch offenses 2019-10-13 16:04:26 +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
6340792f78 manpages: output formatting fixes 2019-08-20 08:28:35 -04:00
EricFromCanada
a3e0647797 manpages: whitespace fixes 2019-08-20 08:24:20 -04:00
DarthSim
ddc032d989 Fix run_audit result in bump-formula-pr 2019-07-18 18:13:00 +06:00
Christian Moritz
170c6e0c70 bump-formula-pr: refactor audit to own method to reduce complexity 2019-07-18 01:31:25 +02:00
Christian Moritz
2d9e7922b9 bump-formula-pr: rename versioned alias if necessary 2019-07-17 23:55:29 +02: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
fa6404e0f5 grammar fixes 2019-04-13 21:29:32 -04:00
Mike McQuaid
021468c8c0
bump-formula-pr: improve no formula output.
This means the help text will be output.
2019-03-20 11:33:11 +00:00
Mike McQuaid
fbaa0c35a6
bump-formula-pr: move auto-update to brew.sh
It’s always run anyway but this at least means Homebrew/brew and tap code is all up to date before we start querying any objects.

Fixes #5876.
2019-03-20 11:06:45 +00:00
Mike McQuaid
e095da4d01
rubocop: enable Layout/EmptyLineAfterGuardClause. 2019-02-21 12:55:49 +00:00
Mike McQuaid
d64429a736
rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Mike McQuaid
bbea109926
dev-cmd: remove --help headers and tweak docs. 2019-01-30 21:39:28 +00:00
Mike McQuaid
867b155479
Add missing conflicts to command options. 2019-01-29 19:39:41 +00:00