Mike McQuaid 2b363b904c
brew.sh: cache HOMEBREW_VERSION on disk.
This is a (relatively, for this Bash script) expensive operation that
can be trivially cached so: let's do so.

Speedup on my machine:

```
$ hyperfine "brew --version" "HOMEBREW_VERSION_CACHE=1 brew --version"
Benchmark 1: brew --version
  Time (mean ± σ):     173.4 ms ±   5.1 ms    [User: 28.7 ms, System: 67.0 ms]
  Range (min … max):   167.3 ms … 182.9 ms    15 runs

Benchmark 2: HOMEBREW_VERSION_CACHE=1 brew --version
  Time (mean ± σ):     145.9 ms ±   4.0 ms    [User: 22.4 ms, System: 33.9 ms]
  Range (min … max):   140.0 ms … 154.5 ms    17 runs

Summary
  HOMEBREW_VERSION_CACHE=1 brew --version ran
    1.19 ± 0.05 times faster than brew --version
```

Co-authored-by: Bo Anderson <mail@boanderson.me>
2024-05-14 15:46:32 +09:00
..
2024-05-13 07:36:51 +01:00
2024-05-13 14:30:06 -07:00
2024-05-06 22:57:23 -04:00
2024-05-02 09:40:09 +02:00
2024-05-01 11:35:21 +02:00
2024-05-13 14:57:08 -07:00
2024-05-01 11:35:21 +02:00
2024-05-01 11:35:21 +02:00
2024-05-01 11:35:21 +02:00
2024-05-09 20:14:16 -07:00
2024-05-02 09:40:09 +02:00
2024-05-01 11:35:21 +02:00
2024-05-01 11:35:21 +02:00
2024-05-01 11:35:21 +02:00
2024-05-01 11:35:21 +02:00
2024-05-01 11:35:21 +02:00
2024-05-13 07:36:51 +01:00
2024-04-22 21:16:49 +02:00
2024-04-22 21:16:49 +02:00
2024-05-01 11:35:21 +02:00
2024-05-01 11:35:21 +02:00
2024-05-01 11:35:21 +02:00
2024-05-01 11:35:21 +02:00
2024-05-13 07:36:51 +01:00
2024-05-12 08:58:35 -07:00
2024-05-01 11:35:21 +02:00

Homebrew Ruby API

This is the API for Homebrew.

The main class you should look at is the {Formula} class (and classes linked from there). That's the class that's used to create Homebrew formulae (i.e. package descriptions). Assume anything else you stumble upon is private.

You may also find the Formula Cookbook and Ruby Style Guide helpful in creating formulae.

Good luck!