Mike McQuaid
e71b1473b8
formula_creator: tweak variable name
2025-05-30 14:55:50 +01:00
Anatoli Babenia
87e57368d4
create: explain file header length logic
2025-05-30 11:12:36 +03:00
Anatoli Babenia
d860fa1fa8
create: fix archive check if HTML starts with spaces
2025-05-30 11:12:36 +03:00
Bevan Kay
6278ac1801
Merge branch 'master' into cabal
2025-05-29 22:44:20 +10:00
Patrick Linnane
5ee4e609ac
formula_creator: Update Ruby template
...
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2025-05-23 20:58:02 -07:00
botantony
92832c258c
dev-cmd/create: add --cabal
switch
...
Signed-off-by: botantony <antonsm21@gmail.com>
2025-05-18 20:18:34 +02:00
Marius Kleiner
c18dab0e2c
Fix style errors
2025-03-30 18:15:00 +02:00
Marius Kleiner
812f953d39
Even simpler check for nil/empty string/etc.
2025-03-30 18:08:20 +02:00
Marius Kleiner
426336a6ae
Simplify nil check
2025-03-30 18:01:02 +02:00
Marius Kleiner
59b441e718
Don't fail if GitHub repo homepage is not present
2025-03-30 17:09:01 +02:00
Mike McQuaid
11426c9680
Merge pull request #19623 from abitrolly/github-homepage-empty
...
create: use GitHub project URL if homepage is empty
2025-03-28 11:52:05 +00:00
Anatoli Babenia
d90a1990ac
create: fix brew style
2025-03-28 07:27:47 +03:00
Anatoli Babenia
9f1093266d
Update Library/Homebrew/formula_creator.rb
...
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2025-03-28 07:27:47 +03:00
Anatoli Babenia
62753a5ec6
create: check that downloaded URL is actually archive
...
My common mistake is to specify release URL, like
brew crate https://github.com/hugelgupf/p9/releases/tag/v0.3.0
which gives unpacking errors later. It should be archive instead
brew create https://github.com/hugelgupf/p9/archive/refs/tags/v0.3.0.tar.gz
Ideally we can try to autodetect the archive from release page,
but erroring out if downloaded file is HTML page should be handy
for early spotting other URL mistakes too.
2025-03-28 07:27:47 +03:00
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