lib/katello/tasks/upgrade_check.rake in katello-2.4.3 vs lib/katello/tasks/upgrade_check.rake in katello-2.4.4
- old
+ new
@@ -1,10 +1,10 @@
-DESIRED_VERSION = "2.4.2"
+DESIRED_VERSION = Gem::Version.new("2.4.3")
CP_LISTEN_ACTION = "Actions::Candlepin::ListenOnCandlepinEvents"
def current_version
- Katello::VERSION
+ Gem::Version.new(Katello::VERSION)
end
namespace :katello do
task :upgrade_check => ['environment'] do
desc "Task that can be run before upgrading to Katello 3.0 to check if system is upgrade ready"
@@ -19,13 +19,13 @@
task_status = task_count > 1 ? fail : success
puts "Checking for running tasks..."
puts "[#{task_status}] - There are #{task_count} active tasks.\n\n"
# check the current version
- version_status = current_version == DESIRED_VERSION ? success : fail
+ version_status = current_version >= DESIRED_VERSION ? success : fail
puts "Checking the current version..."
puts "[#{version_status}] - Current version of Katello is #{current_version} " \
- "and needs to be #{DESIRED_VERSION}\n\n"
+ "and needs to greater than or equal to #{DESIRED_VERSION}\n\n"
# run the content host check
puts "Checking content hosts..."
Rake::Task["katello:preupgrade_content_host_check"].invoke