mirror of
https://github.com/donl/homebrew-cask-versions.git
synced 2026-05-24 22:06:54 -06:00
2.3 KiB
2.3 KiB
How to Contribute
Instructions from the main repository apply. Exceptions are documented on the README and this document.
Naming Versions Casks
All Cask names and tokens should be of the form of:
<token><numbered version> or <token>-<pre-release type>
Versions Token Examples
| Cask Token | <token>-<numbered version> |
Filename |
|---|---|---|
alfred 2 |
alfred2 |
alfred2.rb |
dash |
dash3 |
dash3.rb |
lingon-x |
lingon-x5 |
lingon-x5.rb |
transmit |
transmit4 |
transmit4.rb |
| Cask Token | <token>-<pre-release type> |
Filename |
|---|---|---|
docker |
docker-edge |
docker-edge.rb |
firefox |
firefox-beta |
firefox-beta.rb |
sublime-text |
sublime-text-dev |
sublime-text-dev.rb |
vlc |
vlc-nightly |
vlc-nightly.rb |
Nightly Builds (Nightlies)
For Casks of nightlies, version, sha256, and url change frequently, making the Cask constantly outdated. To alleviate having to regularly update them, the use of a url do block in conjunction with version :latest and sha256 :no_check is encouraged, to ensure the latest version is always fetched.
See this pull request for exist-db-nightly for an example of the procedure.
Example (exist-db-nightly.rb):
url do
require "open-uri"
base_url = "http://static.adamretter.org.uk/exist-nightly"
builds_url = "#{base_url}/table.html"
latest_build_filename = URI(builds_url).open do |io|
io.read.scan(%r{<tr>.*?<td>(.*?)</td>.*?<a href="([^\"]+)">dmg}m).max[1]
end
"#{base_url}/#{latest_build_filename}"
end