Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 1.45 KB

CONTRIBUTING.md

File metadata and controls

23 lines (17 loc) · 1.45 KB

How to Contribute

All of the instructions for contributing from the main repository apply, and won't be repeated here. You simply need to change references to caskroom/homebrew-cask (that repository) to caskroom/homebrew-versions (this repository).

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 = open(builds_url) do |io|
      io.read.scan(%r{<tr>.*?<td>(.*?)</td>.*?<a href="([^\"]+)">dmg}m).max[1]
    end
    "#{base_url}/#{latest_build_filename}"
  end