All of the instructions for contributing from the main repository apply, and won't be repeated here. You simply need to change references to homebrew/homebrew-cask
(that repository) to homebrew/homebrew-cask-versions
(this repository).
All Cask names and tokens should be of the form of:
<token><numbered version>
or <token>-<pre-release type>
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 |
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