Skip to content

Commit

Permalink
Update SemanticCompare
Browse files Browse the repository at this point in the history
  • Loading branch information
j8r committed Sep 21, 2019
1 parent d94145d commit d5e1d66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/prefix/base.cr
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ module DPPM::Prefix::Base
# If an array of versions is already provided by a dependency
if dep_vers = dependencies[dep_src.name]?
dep_vers.select! do |semantic_version|
SemanticCompare.expression semantic_version, version_expr
SemanticCompare.complex_expression semantic_version, version_expr
end
else
# HTTPget all versions, parse and test if the versions available match
dep_vers = dependencies[dep_src.name] = Array(SemanticVersion).new
dep_src.pkg_file.each_version do |ver|
semantic_version = SemanticVersion.parse ver
dep_vers << semantic_version if SemanticCompare.expression semantic_version, version_expr
dep_vers << semantic_version if SemanticCompare.complex_expression semantic_version, version_expr
end
end
# Raise an error if two packages require different versions of a same dependency
Expand Down

0 comments on commit d5e1d66

Please sign in to comment.