Fix doc about macOS version comparison (#90326)
Co-authored-by: Miccal Matthews <miccal.matthews@gmail.com>
This commit is contained in:
parent
4d20e835d6
commit
29e90203a0
|
@ -7,10 +7,10 @@
|
|||
|
||||
The value should be another Cask token, needed by the current Cask.
|
||||
|
||||
Example use: [`SSHFS`](https://github.com/Homebrew/homebrew-cask/blob/312ae841f1f1b2ec07f4d88b7dfdd7fbdf8d4f94/Casks/sshfs.rb#L12) depends on OSXFUSE:
|
||||
Example use: [`cellery`](https://github.com/Homebrew/homebrew-cask/blob/4002df8f6bca93ed6eb40494995fcfa038cf99bf/Casks/cellery.rb#L11) depends on OSXFUSE:
|
||||
|
||||
```ruby
|
||||
depends_on cask: 'osxfuse'
|
||||
depends_on cask: "osxfuse"
|
||||
```
|
||||
|
||||
## depends_on formula:
|
||||
|
@ -20,42 +20,42 @@ The value should name a Homebrew Formula needed by the Cask.
|
|||
Example use: some distributions are contained in archive formats such as `7z` which are not supported by stock Apple tools. For these cases, a more capable archive reader may be pulled in at install time by declaring a dependency on the Homebrew Formula `unar`:
|
||||
|
||||
```ruby
|
||||
depends_on formula: 'unar'
|
||||
depends_on formula: "unar"
|
||||
```
|
||||
|
||||
## depends_on macos:
|
||||
|
||||
### Requiring an Exact macOS Release
|
||||
|
||||
The value for `depends_on macos:` may be a symbol, string, or an array, listing the exact compatible macOS releases.
|
||||
The value for `depends_on macos:` may be a symbol or an array of symbols, listing the exact compatible macOS releases.
|
||||
|
||||
The available values for macOS releases are:
|
||||
|
||||
| symbol | corresponding string
|
||||
| symbol | corresponding release
|
||||
| -------------------|----------------------
|
||||
| `:yosemite` | `'10.10'`
|
||||
| `:el_capitan` | `'10.11'`
|
||||
| `:sierra` | `'10.12'`
|
||||
| `:high_sierra` | `'10.13'`
|
||||
| `:mojave` | `'10.14'`
|
||||
| `:catalina` | `'10.15'`
|
||||
| `:yosemite` | `10.10`
|
||||
| `:el_capitan` | `10.11`
|
||||
| `:sierra` | `10.12`
|
||||
| `:high_sierra` | `10.13`
|
||||
| `:mojave` | `10.14`
|
||||
| `:catalina` | `10.15`
|
||||
|
||||
Only major releases are covered (version numbers containing a single dot). The symbol form is preferred for readability. The following are all valid ways to enumerate the exact macOS release requirements for a Cask:
|
||||
Only major releases are covered (version numbers containing a single dot). The symbol form is used for readability. The following are all valid ways to enumerate the exact macOS release requirements for a Cask:
|
||||
|
||||
```ruby
|
||||
depends_on macos: :catalina
|
||||
depends_on macos: [:mojave, :catalina]
|
||||
depends_on macos: '10.15'
|
||||
depends_on macos: ['10.14', '10.15']
|
||||
depends_on macos: [
|
||||
:mojave,
|
||||
:catalina,
|
||||
]
|
||||
```
|
||||
|
||||
### Setting a Minimum macOS Release
|
||||
|
||||
`depends_on macos:` can also accept a string starting with a comparison operator such as `>=`, followed by an macOS release in the form above. The following are both valid expressions meaning “at least macOS 10.15”:
|
||||
`depends_on macos:` can also accept a string starting with a comparison operator such as `>=`, followed by an macOS release in the form above. The following is a valid expression meaning “at least macOS Catalina (10.15)”:
|
||||
|
||||
```ruby
|
||||
depends_on macos: '>= :catalina'
|
||||
depends_on macos: '>= 10.15'
|
||||
depends_on macos: ">= :catalina"
|
||||
```
|
||||
|
||||
A comparison expression cannot be combined with any other form of `depends_on macos:`.
|
||||
|
|
Loading…
Reference in New Issue