Delete easily outdated template docs for brew create

This commit is contained in:
Issy Long 2024-01-29 22:39:05 +00:00
parent 3f5ae06ab1
commit 3955a70a26
No known key found for this signature in database
GPG Key ID: 8247C390DADC67D4
2 changed files with 4 additions and 50 deletions

View File

@ -165,36 +165,13 @@ If the `generate_cask_token` script does not work for you, see [Cask Token Detai
#### Creating the cask file #### Creating the cask file
Once you know the token, create your cask with the handy-dandy `brew create --cask` command: Once you know the token, create your cask with the `brew create --cask` command:
```bash ```bash
brew create --cask download-url --set-name my-new-cask brew create --cask download-url --set-name my-new-cask
``` ```
This will open `EDITOR` with a template for your new cask, to be stored in the file `my-new-cask.rb`. Running the `create` command above will get you a template that looks like this: This will open `EDITOR` with a template for your new cask, to be stored in the file `my-new-cask.rb`.
```ruby
cask "my-new-cask" do
version "fill in the version here"
sha256 "fill in the sha256 here"
url "download-url"
name "fill in the name"
desc "Fill in the description here"
homepage "fill in the homepage here"
livecheck do
url ""
strategy ""
end
depends_on macos: ""
app ""
zap trash: ""
end
```
#### Cask stanzas #### Cask stanzas

View File

@ -60,33 +60,10 @@ Run `brew create` with a URL to the source tarball:
brew create https://example.com/foo-0.1.tar.gz brew create https://example.com/foo-0.1.tar.gz
``` ```
This creates `$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/f/foo.rb` and opens it in your `EDITOR`.
Passing in `--ruby` or `--python` will populate various defaults commonly useful for projects written in those languages. Passing in `--ruby` or `--python` will populate various defaults commonly useful for projects written in those languages.
This creates `$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/f/foo.rb` and opens it in your `EDITOR`. If run without any options to customize the output for specific build systems (check `brew create --help` to see which are available) it'll look something like:
```ruby
class Foo < Formula
desc "Fill in a one-line description of your formula"
homepage "https://your.homepage/"
url "https://example.com/foo-0.1.tar.gz"
sha256 "85cc828a96735bdafcf29eb6291ca91bac846579bcef7308536e0c875d6c81d7"
license "Fill in a license identifier"
# depends_on "cmake" => :build
def install
# ENV.deparallelize
system "./configure", *std_configure_args, "--disable-silent-rules"
# system "cmake", "-S", ".", "-B", "build", *std_cmake_args
system "make", "install"
end
test do
system "false"
end
end
```
If `brew` said `Warning: Version cannot be determined from URL` when doing the `create` step, youll need to explicitly add the correct [`version`](https://rubydoc.brew.sh/Formula#version-class_method) to the formula and then save the formula. If `brew` said `Warning: Version cannot be determined from URL` when doing the `create` step, youll need to explicitly add the correct [`version`](https://rubydoc.brew.sh/Formula#version-class_method) to the formula and then save the formula.
Homebrew will try to guess the formulas name from its URL. If it fails to do so you can override this with `brew create <URL> --set-name <name>`. Homebrew will try to guess the formulas name from its URL. If it fails to do so you can override this with `brew create <URL> --set-name <name>`.