diff options
| author | Misty De Meo | 2012-01-22 22:32:15 -0600 |
|---|---|---|
| committer | Misty De Meo | 2012-01-25 21:45:19 -0600 |
| commit | aedacdf209815450204602ff403bb5c4510d6a3a (patch) | |
| tree | 27ecb795418341d3ea2e435c3eb415c7bfc37f91 /Library/Homebrew/cmd/audit.rb | |
| parent | 84a2e44db41ee4c45ad8735b96d9bb7a655efde3 (diff) | |
| download | homebrew-aedacdf209815450204602ff403bb5c4510d6a3a.tar.bz2 | |
Add `devel` to the DSL, + stable and bottle blocks
This commit adds a `devel` entry to the DSL, allowing formulae to
specify an unstable branch.
`devel` takes a block, which should contain standard `url` and `md5`
fields (and `version`, if necessary). This must come after the standard
DSL fields.
This commit also migrates over all formulae currently using `devel` to
the new syntax, as well as formulae which used `head` for non-VCS urls.
The new syntax is also available for `stable` and `bottle`. `stable` is
an option alongside the old syntax. `bottle` replaces the old syntax.
Note that the @stable ivar in Formula has been renamed to @standard,
and the @bottle ivar has been renamed to @bottle_url.
Closes #9735.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Diffstat (limited to 'Library/Homebrew/cmd/audit.rb')
| -rwxr-xr-x | Library/Homebrew/cmd/audit.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index e980466da..5f4af55a2 100755 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -290,7 +290,7 @@ module Homebrew extend self ff.each do |f| problems = [] - if f.unstable and f.stable.nil? + if f.unstable and f.standard.nil? problems += [' * head-only formula'] end @@ -314,6 +314,12 @@ module Homebrew extend self problems += [' * invalid or missing version'] if f.version.to_s.empty? + problems << " * 'devel' block found before stable 'url'" if text =~ /devel.+(url '.+').+(url '.+')/m + + problems << " * 'devel' block found before 'head'" if text =~ /devel.+(head '.+')/m + + problems << " * Empty 'devel' block found" if text =~ /devel do\s+end/ + # Don't try remaining audits on text in __END__ text_without_patch = (text.split("__END__")[0]).strip() |
