From 7239bcc04b371cefec62af40471e243e289be58c Mon Sep 17 00:00:00 2001 From: Bevan Kay Date: Fri, 3 May 2024 22:54:07 +1000 Subject: [PATCH 1/2] docs/cask-cookbook: provide token examples for versioned/development casks --- docs/Cask-Cookbook.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/Cask-Cookbook.md b/docs/Cask-Cookbook.md index 264a476278..0461d1b88d 100644 --- a/docs/Cask-Cookbook.md +++ b/docs/Cask-Cookbook.md @@ -1375,6 +1375,14 @@ To convert the App’s Simplified Name (above) to a token: * Collapse a series of multiple hyphens into one hyphen. * Delete a leading or trailing hyphen. +### Casks pinned to specific versions + +Casks pinned to a specific version of the application (ie. [`carbon-copy-cloner@5`](https://github.com/Homebrew/homebrew-cask/blob/1b8f44198e5e184c597ee07454a1e10f97f36b15/Casks/c/carbon-copy-cloner%405.rb)) should use the same token as the standard cask with a suffix of `@`. For Google Chrome (`google-chrome`), using the "beta" channel, the token should be `google-chrome@beta`. + ### Cask filenames Casks are stored in a Ruby file named after the token, with the file extension `.rb`. @@ -1395,6 +1403,14 @@ These illustrate most of the rules for generating a token: | `LPK25 Editor.app` | LPK25 Editor | lpk25-editor | `lpk25-editor.rb` | | `Sublime Text 2.app` | Sublime Text | sublime-text | `sublime-text.rb` | +For versioned/development channel casks: + +| Standard Cask Token | Derivative | Cask Token | Filename | +|------------------------|---------------------|-----------------------|----------------------| +| `google-chrome` | Beta Channel | `google-chrome@beta` | `google-chrome@beta.rb` | +| `vlc` | Nightly Channel | `vlc@nightly` | `vlc@nightly.rb` | +| `carbon-copy-cloner` | Pinned to version 5 | `carbon-copy-cloner@5`| `carbon-copy-cloner@5.rb` | + #### Tap-specific cask token examples Cask taps have naming conventions specific to each tap. From a52b17916455129f8fbea48c94662e458d41eaec Mon Sep 17 00:00:00 2001 From: Bevan Kay Date: Fri, 3 May 2024 23:02:37 +1000 Subject: [PATCH 2/2] docs linting --- docs/Cask-Cookbook.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Cask-Cookbook.md b/docs/Cask-Cookbook.md index 0461d1b88d..a90c6bb01d 100644 --- a/docs/Cask-Cookbook.md +++ b/docs/Cask-Cookbook.md @@ -1377,7 +1377,7 @@ To convert the App’s Simplified Name (above) to a token: ### Casks pinned to specific versions -Casks pinned to a specific version of the application (ie. [`carbon-copy-cloner@5`](https://github.com/Homebrew/homebrew-cask/blob/1b8f44198e5e184c597ee07454a1e10f97f36b15/Casks/c/carbon-copy-cloner%405.rb)) should use the same token as the standard cask with a suffix of `@