aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2016-10-30 07:32:32 -0400
committerGitHub2016-10-30 07:32:32 -0400
commitec527ff982e0dbaa7d7089bd8c5e209fb94e210a (patch)
tree404f5996ff2abdb1379c438aac9b3102b0f5f5a5 /Library
parent5e44184b35dcc099a7a2bb19c42ee48bb3d4e247 (diff)
parenta093c62b1694d40884fdcc9c88d28ce30168ee27 (diff)
downloadbrew-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.rb12
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