93 Commits

Author SHA1 Message Date
Anatoli Babenia
c0476672b5 create: use GitHub project URL if homepage is empty 2025-03-27 08:00:30 +03:00
botantony
21714d63a4
formula: add std_zig_args 2025-02-21 14:53:34 +01:00
Adrian Ho
987363da15 clear core tap cache on formula creation
Addresses inability to find just-created formula, see https://github.com/Homebrew/brew/pull/19244#issuecomment-2646030394 for context.
2025-02-11 11:41:15 +08:00
Adrian Ho
fbf1d68222 formula_creator: depend on latest python
Followup to #19173, which causes `brew create` to error out on the literal `python@x.y` dependency.

Related to #19240.
2025-02-05 18:37:37 +08:00
BingoKingo
e99034d8e3
Update formula_creator.rb 2025-02-01 17:23:02 +08:00
BingoKingo
cff9a565b6
formula_creator.rb: add bundle install and additional dependency comment 2025-01-30 18:22:22 +08:00
BingoKingo
c49cdc260c
Update formula_creator.rb 2025-01-30 12:51:58 +08:00
Issy Long
45978435e7
rubocop: Use Sorbet/StrictSigil as it's better than comments
- Previously I thought that comments were fine to discourage people from
  wasting their time trying to bump things that used `undef` that Sorbet
  didn't support. But RuboCop is better at this since it'll complain if
  the comments are unnecessary.

- Suggested in https://github.com/Homebrew/brew/pull/18018#issuecomment-2283369501.

- I've gone for a mixture of `rubocop:disable` for the files that can't
  be `typed: strict` (use of undef, required before everything else, etc)
  and `rubocop:todo` for everything else that should be tried to make
  strictly typed. There's no functional difference between the two as
  `rubocop:todo` is `rubocop:disable` with a different name.

- And I entirely disabled the cop for the docs/ directory since
  `typed: strict` isn't going to gain us anything for some Markdown
  linting config files.

- This means that now it's easier to track what needs to be done rather
  than relying on checklists of files in our big Sorbet issue:

```shell
$ git grep 'typed: true # rubocop:todo Sorbet/StrictSigil' | wc -l
    268
```

- And this is confirmed working for new files:

```shell
$ git status
On branch use-rubocop-for-sorbet-strict-sigils
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        Library/Homebrew/bad.rb
        Library/Homebrew/good.rb

nothing added to commit but untracked files present (use "git add" to track)

$ brew style
Offenses:

bad.rb:1:1: C: Sorbet/StrictSigil: Sorbet sigil should be at least strict got true.
^^^^^^^^^^^^^

1340 files inspected, 1 offense detected
```
2024-08-12 15:24:27 +01:00
Patrick Linnane
665578584a
formula_creator: don't recommend interpolating bin
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-08-09 11:58:51 -07:00
Branch Vincent
96c9ea1485
docs: update with std_npm_args 2024-08-03 20:28:39 -07:00
Markus Reiter
480e264d9a
Lint Ruby docs. 2024-05-01 11:35:21 +02:00
Markus Reiter
0f0055ede4
Make documentation @api private by default. 2024-04-26 19:04:20 +02:00
Michael Cho
3021ba91fd
dev-cmd/create: add types
Signed-off-by: Michael Cho <michael@michaelcho.dev>
2024-03-17 11:33:47 -04:00
Patrick Linnane
95449b4dc3
formula_creator: remove ENV.deparallelize suggestion
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-02-19 08:14:44 -08:00
Patrick Linnane
c1a7e9e01c
formula_creator: ENV.deparallelize is only for autotools
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-02-16 15:23:25 -08:00
Anatoli Babenia
23c2eabf9a formula_creator: Fix GitHub parsing when name doesn't match URL
The proper fix for #16675.
2024-02-16 14:57:49 +03:00
Anatoli Babenia
cf598aaf5e formula_creator: Remove unused GitHub property 2024-02-16 09:29:45 +03:00
Michael Cho
b62c77e8da
formula_creator: keep std_configure_args
Match `homebrew-core` preferences where we usually keep
`std_configure_args` even if some args are unrecognized and
where we pass any additional args before `std_configure_args`.
2023-12-28 16:00:28 -05:00
Anatoli Babenia
6afd15ae00
create: Fix getting name from GitHub archives
`brew create https://github.com/lapce/lapce/archive/v0.3.0.tar.gz` was
getting the wrong name 'v3.0.0' from the URL

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-12-05 14:49:53 -05:00
Anatoli Babenia
97654decbd formula_creator: Remove default values for fetch: and head: 2023-11-29 19:17:10 +00:00
Anatoli Babenia
dd939340fd formula_creator: Pass url to constructor 2023-11-29 19:13:19 +00:00
Anatoli Babenia
a7756bd303 formula_creator: Remove tap accessor 2023-11-29 18:57:24 +00:00
Anatoli Babenia
2d9db76d61 formula_creator: Remove unneeded reader for url 2023-11-29 18:48:06 +00:00
Anatoli Babenia
b6ef91e879 formula_creator: Remove unneeded accessors 2023-11-29 18:43:03 +00:00
Anatoli Babenia
e59a407ba4 brew style --fix 2023-11-28 18:32:56 +00:00
Anatoli Babenia
cfa7d82f65 Add typecheck to constructor 2023-11-28 18:31:30 +00:00
Anatoli Babenia
ea0a88a517 tap is a reader attribute 2023-11-28 18:10:20 +00:00
Anatoli Babenia
b2df600e3e Move mode into constructor params 2023-11-28 18:07:32 +00:00
Anatoli Babenia
912678ca5e Save tap in constructor 2023-11-28 16:07:38 +00:00
Anatoli Babenia
c17fc7b6f6 Remove license accessor 2023-11-28 15:46:01 +00:00
Anatoli Babenia
2151c59de2 Remove version from accessors 2023-11-28 15:39:04 +00:00
Anatoli Babenia
2b3ef56aa4 Try keyword arguments 2023-11-28 15:35:58 +00:00
Anatoli Babenia
0917a7ca6b brew style 2023-11-27 21:09:19 +00:00
Anatoli Babenia
4e0b589d8c formula_creator: Set version default in constructor 2023-11-27 21:09:14 +00:00
Anatoli Babenia
259823cf4d formula_creator: Set initial values for name and version in constructor 2023-11-27 21:08:18 +00:00
Anatoli Babenia
e2d2ea1d04 formula_creator: Remove dependency on args 2023-11-27 21:08:10 +00:00
Anatoli Babenia
c148396b98 create: Pass fetch value directly into constructor 2023-11-27 21:04:19 +00:00
Anatoli Babenia
4063675e0e Suggestion by @MikeMcQuaid
"ActiveSupport adds blank? to NilClass."
2023-11-23 18:53:22 +03:00
Anatoli Babenia
bfbea8be26 Style fix 2023-11-23 18:12:12 +03:00
Anatoli Babenia
4fed4529d3 Raise when formula name is empty
P.S. That still doesn't check if the name is invalid, like "34"
2023-11-23 18:06:40 +03:00
Anatoli Babenia
d8f19ff881 Rename generate! to write_formula! 2023-11-23 18:04:03 +03:00
Anatoli Babenia
51b16585fb formula_creator: Remove path attr to reduce code complexity
`path` attribute is used only once, and it is easier to calculate
it on the fly than to update its state after different methods.
2023-11-21 13:28:47 +03:00
Eric Knibbe
931f762598
docs+rubydoc: various grammar/wording fixes 2023-09-11 02:26:37 -04:00
Mike McQuaid
b3c33d34ab
Various sharding fixes
- Load paths with no API when needed (e.g. for `brew edit`)
- Use no API mode for `brew log` as it's needed there
- Define sharding format for homebrew-cask and homebrew-core inside
  `Tap` methods
- Create new formulae/casks in location defined by these `Tap` methods
- Fix a bug in Formulary that made sharded formulae lookup less
  efficient (and possibly broke it for core and some API usage)
- Fix various other hardcoded Formula/Cask directory assumptions

Co-authored-by: Bo Anderson <mail@boanderson.me>
2023-08-04 16:43:13 +01:00
EricFromCanada
ca3fe811de
formula_creator: require version before creating 2023-07-23 00:05:43 -04:00
Mike McQuaid
7da934f7e2
Deprecate/disable/delete code.
The next release after this is merged will be 4.1.0.

Co-authored-by: Markus Reiter <me@reitermark.us>
2023-07-06 16:56:20 +01:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Michael Cho
a06a2b73e2
formula_creator: use tool-agnostic meson commands 2022-12-08 10:10:36 -08:00
Rui Chen
4474818d07 create(go): add -s -w ldflags to reduce the artifact size
Signed-off-by: Rui Chen <rui@chenrui.dev>
2021-08-22 14:30:26 -04:00
Bo Anderson
f174d4363f
extend/pathname: limit write override to a refinement 2021-05-04 14:20:20 +01:00