docs/cask-cookbook: provide token examples for versioned/development casks

This commit is contained in:
Bevan Kay 2024-05-03 22:54:07 +10:00 committed by GitHub
parent e944830b1f
commit 7239bcc04b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1375,6 +1375,14 @@ To convert the Apps Simplified Name (above) to a token:
* Collapse a series of multiple hyphens into one hyphen. * Collapse a series of multiple hyphens into one hyphen.
* Delete a leading or trailing 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 `@<version-number`. For Carbon Copy Cloner (`carbon-copy-cloner`), pinned to version 5, the token should be `carbon-copy-cloner@5`.
### Casks pinned to development channels
Casks that use an development "channel", such as betas, should use the same token as the standard cask with a suffix of `@<channel>`. For Google Chrome (`google-chrome`), using the "beta" channel, the token should be `google-chrome@beta`.
### Cask filenames ### Cask filenames
Casks are stored in a Ruby file named after the token, with the file extension `.rb`. 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` | | `LPK25 Editor.app` | LPK25 Editor | lpk25-editor | `lpk25-editor.rb` |
| `Sublime Text 2.app` | Sublime Text | sublime-text | `sublime-text.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 #### Tap-specific cask token examples
Cask taps have naming conventions specific to each tap. Cask taps have naming conventions specific to each tap.