diff options
| author | Mike McQuaid | 2016-10-30 07:32:32 -0400 |
|---|---|---|
| committer | GitHub | 2016-10-30 07:32:32 -0400 |
| commit | ec527ff982e0dbaa7d7089bd8c5e209fb94e210a (patch) | |
| tree | 404f5996ff2abdb1379c438aac9b3102b0f5f5a5 /Library | |
| parent | 5e44184b35dcc099a7a2bb19c42ee48bb3d4e247 (diff) | |
| parent | a093c62b1694d40884fdcc9c88d28ce30168ee27 (diff) | |
| download | brew-ec527ff982e0dbaa7d7089bd8c5e209fb94e210a.tar.bz2 | |
Merge pull request #1406 from Homebrew/revert-1366-audit-check-version-decrease
Revert "audit: check the version does not decrease."
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/dev-cmd/audit.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index afa875bdb..3095372a2 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -655,11 +655,10 @@ class FormulaAuditor return unless formula.tap.git? # git log is required fv = FormulaVersions.new(formula, max_depth: 10) - no_decrease_attributes = [:revision, :version_scheme] - attributes = no_decrease_attributes + [:version] + attributes = [:revision, :version_scheme] attributes_map = fv.version_attributes_map(attributes, "origin/master") - no_decrease_attributes.each do |attribute| + attributes.each do |attribute| attributes_for_version = attributes_map[attribute][formula.version] next if attributes_for_version.empty? if formula.send(attribute) < attributes_for_version.max @@ -667,14 +666,11 @@ class FormulaAuditor end end - versions = attributes_map[:version].keys - if formula.version < versions.max - problem "version should not decrease" - end + revision_map = attributes_map[:revision] return if formula.revision.zero? + if formula.stable - revision_map = attributes_map[:revision] if revision_map[formula.stable.version].empty? # check stable spec problem "'revision #{formula.revision}' should be removed" end |
