1195 Commits

Author SHA1 Message Date
Mike McQuaid
12bdb38663
rubocop: brew style --fix autocorrections. 2020-05-12 08:32:27 +01:00
Bo Anderson
58cecf38cf resource: restore fetch in stage
Fixes #7546.
2020-05-12 03:24:28 +01:00
Michelle Nguyen
2264c08cee
Fetch formula resources before unlinking during upgrade.
Fixes #6374.
2020-05-11 09:37:56 +01:00
nandahkrishna
77e74e7e69
Adding livecheck Formula DSL 2020-05-11 09:41:13 +05:30
Mike McQuaid
5685f379ef
Formula#outdated_kegs: check versions aren't identical.
Even if the `version_scheme` does not match: we should never try to
`upgrade` (or show `outdated`) for two identical `pkg_version`s.

If this is ever needed: a `revision` bump should be done instead.

Fixes #7507
2020-05-10 13:42:55 +01:00
Mike McQuaid
8e318d81bc
formula: add pkgetc method.
This should provide a more "type-safe" way of referring to the `etc`
directories of other formulae e.g.
https://github.com/Homebrew/homebrew-core/pull/54257 so that the output
will change if the formula name changes.
2020-05-05 08:34:07 +01:00
Mike McQuaid
e6dffdd006
Merge pull request #7458 from Bo98/uses_since
software_spec: add uses_from_macos since bound
2020-05-01 12:53:59 +01:00
Mike McQuaid
04a64bb724
formula: disable! deprecates before disable date.
This makes more sense to me; if we expect a formula will be disabled at
a given point in the future then we should deprecate it immediately.
2020-04-29 09:34:40 +01:00
Bo Anderson
eb303dd654 software_spec: add uses_from_macos since bound 2020-04-28 16:45:32 +01:00
Michka Popoff
f8536d0b5b formula: add standard meson args
libdir is especially important on Fedora based distributions,
where it might default to "lib64", but everything else expects "lib",
so forcing the libdir is necessary there.
2020-04-15 15:14:13 +02:00
Mike McQuaid
cbb5fd7657
Merge pull request #7257 from iMichka/linuxdependson
formula: add on_macos and on_linux
2020-04-13 09:13:06 +01:00
Michka Popoff
c7927f5af5 formula: add linux and macos only function blocks 2020-04-12 23:51:41 +02:00
Mike McQuaid
373650d00d
KegOnlyReason: add reason helpers, rename valid. 2020-04-12 13:12:02 +01:00
Bo Anderson
811b177cf8 formula: make CMake SDK root choice consistent with superenv 2020-04-07 17:22:16 +01:00
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Mike McQuaid
3effcc4dff
Tweak formula deprecation/disabling. 2020-04-01 13:42:52 +01:00
Mike McQuaid
4121659413
Merge remote-tracking branch 'origin/master' into deprecate-method-formulae 2020-04-01 13:07:11 +01:00
Bo Anderson
119b3fe69a utils/shebang: add rewrite_shebang 2020-03-27 13:04:39 +00:00
vidusheeamoli
7a62973de2 add deprecate module 2020-03-19 23:44:00 +05:30
Gautham G
badcaa15e4
ARGV: Deprecate ARGV.keep_tmp? 2020-03-15 13:24:48 +00:00
Gautham G
1292c4559c ARGV: Deprecate ARGV.interactive? 2020-03-15 16:28:04 +05:30
Bo Anderson
2592b93770 formula: ensure CMake uses the desired SDK 2020-03-09 22:40:02 +00:00
Troels Henriksen
76afad82be formula: add std_cabal_v2_args 2020-03-06 15:35:30 +01:00
Mike McQuaid
0d7100e686
Merge pull request #7105 from EricFromCanada/json-requirements
API: supply additional data for requirements
2020-03-04 11:47:10 +00:00
Mike McQuaid
f6631d6449
Merge pull request #7019 from iMichka/python2doc
brew: remove most traces of python@2
2020-03-04 11:21:07 +00:00
EricFromCanada
5277f849d9 API: supply additional data for requirements 2020-03-03 15:00:33 -05:00
Bo Anderson
a0f88c7197 formula: sort versioned_formulae by version 2020-02-26 15:59:50 +00:00
Mike McQuaid
dfa22680df
Autofix rubocop checks. 2020-02-19 11:24:12 +00:00
Michka Popoff
c46a30b575 brew: remove most traces of python@2 2020-02-17 22:38:24 +01:00
Mike McQuaid
7ca8a52f01
Merge pull request #7046 from MikeMcQuaid/set_git_name_email
test: set Git name and email.
2020-02-17 20:29:39 +00:00
Mike McQuaid
f31e01c3ad
test: set Git name and email.
Extract the code from `bottle.rb` into `utils/git.rb` and ensure it's
run before we run tests.

Should resolve issues like in
https://github.com/Homebrew/homebrew-core/pull/50328
2020-02-17 19:40:44 +00:00
Jonathan Chang
2c94fca110 formula: don't emit standard args for cmake and go 2020-02-17 14:42:43 +11:00
Mike McQuaid
a55454dfea
Merge pull request #6992 from igas/url-in-json
Add stable url, tag and revision to json output
2020-02-02 17:50:37 +01:00
Igor Kapkov
5ef9b8863a Move urls code and add devel urls 2020-02-02 17:11:29 +01:00
Igor Kapkov
82fde4e1e5 Add stable url, tag and revision to json output 2020-02-02 16:59:49 +01:00
Mike McQuaid
bbe300ab2a
Merge pull request #6983 from GauthamGoli/argv-cleanup-9
ARGV: Replace ARGV.verbose? with Homebrew.args.verbose?
2020-02-02 15:41:47 +01:00
Gautham Goli
acde828a45 ARGV: Replace ARGV.verbose? with Homebrew.args.verbose? 2020-02-02 14:00:04 +01:00
Dawid Dziurla
b9be9bb71c
formula: add std_go_args 2020-01-31 14:11:33 +01:00
Mike McQuaid
0c1b556196
uses_from_macos: remove before/after.
We're not actually using this anywhere and it makes the code
more complicated.

Relatedly, this PR fixes the issue where
`uses_from_macos "python@2" => :build` was valid on macOS but not
on Linux.
2019-12-19 14:36:33 +00:00
Mike McQuaid
a755bec6a8
formula: handle missing runtime dependency formulae.
This is most likely an old formula with bad dependency data so output
the path so it can be uninstalled.
2019-12-10 16:56:10 +00:00
Mike McQuaid
5dd8ead51a
Rename Formula#installed? to Formula#latest_version_installed?
This naming has always been a bit weird and confusing so let's change
it and provide a `compat` fallback for later deprecation.
2019-12-03 11:42:42 +00:00
Mike McQuaid
766fc4b301
Fix RuboCop 0.77.0 failures. 2019-11-28 15:10:50 +00:00
Bo Anderson
3cb2d62a1b formula: copy hidden files from bottles. 2019-11-14 23:31:40 +00:00
Mike McQuaid
ee1cbfc8d3
formula: refactor outdated_kegs logic.
- Use the `Formula.cache` and `Cacheable` rather than rolling our own.
- Use keyword arguments instead of `options = {}`
- Improve readability in general
2019-11-06 11:49:31 +00:00
Mike McQuaid
7d77a9e97d
formula: add runtime_installed_formula_dependents method. 2019-11-06 10:04:13 +00:00
Mike McQuaid
ddcbdbe0c0
formula: cache runtime_dependencies related stuff. 2019-11-06 10:04:13 +00:00
Markus Reiter
1ebc63f232 Don't add leading whitespace to _JAVA_OPTIONS. 2019-10-27 18:27:59 +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
341ea60807
Auto-fix Style/RedundantBegin offenses
- This also required auto-fixes for Layout/EmptyLinesAroundBlockBody and
  Layout/InconsistentIndentation once the auto-fixer had got rid of the
  "redundant begin"s.
2019-10-13 16:04:27 +01:00
Issy Long
b78028b9c2
Auto-fix Performance/RegexpMatch offenses 2019-10-13 16:04:26 +01:00