Merge pull request #1406 from Homebrew/revert-1366-audit-check-version-decrease
Revert "audit: check the version does not decrease."
This commit is contained in:
commit
ec527ff982
@ -655,11 +655,10 @@ class FormulaAuditor
|
|||||||
return unless formula.tap.git? # git log is required
|
return unless formula.tap.git? # git log is required
|
||||||
|
|
||||||
fv = FormulaVersions.new(formula, max_depth: 10)
|
fv = FormulaVersions.new(formula, max_depth: 10)
|
||||||
no_decrease_attributes = [:revision, :version_scheme]
|
attributes = [:revision, :version_scheme]
|
||||||
attributes = no_decrease_attributes + [:version]
|
|
||||||
attributes_map = fv.version_attributes_map(attributes, "origin/master")
|
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]
|
attributes_for_version = attributes_map[attribute][formula.version]
|
||||||
next if attributes_for_version.empty?
|
next if attributes_for_version.empty?
|
||||||
if formula.send(attribute) < attributes_for_version.max
|
if formula.send(attribute) < attributes_for_version.max
|
||||||
@ -667,14 +666,11 @@ class FormulaAuditor
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
versions = attributes_map[:version].keys
|
revision_map = attributes_map[:revision]
|
||||||
if formula.version < versions.max
|
|
||||||
problem "version should not decrease"
|
|
||||||
end
|
|
||||||
|
|
||||||
return if formula.revision.zero?
|
return if formula.revision.zero?
|
||||||
|
|
||||||
if formula.stable
|
if formula.stable
|
||||||
revision_map = attributes_map[:revision]
|
|
||||||
if revision_map[formula.stable.version].empty? # check stable spec
|
if revision_map[formula.stable.version].empty? # check stable spec
|
||||||
problem "'revision #{formula.revision}' should be removed"
|
problem "'revision #{formula.revision}' should be removed"
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user