Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix versions comparaison #2

Merged
merged 1 commit into from

2 participants

@renchap
Owner

For example, "0.0.10" was not considered as more recent that "0.0.9", due to string comparison.
We now only check if versions are different, which is better.

@rottenbytes rottenbytes merged commit 685bdd3 into Fotolia:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 16, 2011
  1. @renchap
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 4 deletions.
  1. +3 −4 consistency.rb
View
7 consistency.rb
@@ -38,24 +38,23 @@ def run
next
end
- if target_versions[name] < cb_version then
+ if target_versions[name] != cb_version then
puts "cookbook \"#{name}\" is not up to date. latest is #{cb_version}, #{@environment} has version #{target_versions[name]}"
end
end
-
when "local"
local_versions = get_local_versions()
latest_versions = get_latest_versions()
-
+
latest_versions.each_pair do |name, cb_version|
unless local_versions.has_key?(name)
puts "cookbook \"#{name}\" has no local candidate version"
next
end
- if local_versions[name] < cb_version then
+ if local_versions[name] != cb_version then
puts "cookbook \"#{name}\" is not up to date. latest is #{cb_version}, local version is #{local_versions[name]}"
end
Something went wrong with that request. Please try again.