Update to pg-upgrade output
Changing output based on the presence or absence of a version to upgrade to * Move test for a version to upgrade to earlier. Previously we were checking if an instance had already been upgraded, before we confirmed there was something to upgrade to. * Change test to not use the progress_message method. This isn't an OK Not OK test, it only controls workflow.
This commit is contained in:
parent
5042f69330
commit
7b80458b3f
|
@ -70,6 +70,14 @@ add_command_under_category 'pg-upgrade', 'database',
|
|||
Kernel.exit 0
|
||||
end
|
||||
|
||||
log 'Checking for a newer version of PostgreSQL to install'
|
||||
if upgrade_version && Dir.exist?("#{INST_DIR}/#{upgrade_version}")
|
||||
log "Upgrading PostgreSQL to #{upgrade_version}"
|
||||
else
|
||||
$stderr.puts 'No new version of PostgreSQL installed, nothing to upgrade to'
|
||||
Kernel.exit 0
|
||||
end
|
||||
|
||||
if progress_message('Checking if we already upgraded') do
|
||||
running_version == upgrade_version
|
||||
end
|
||||
|
@ -77,16 +85,6 @@ add_command_under_category 'pg-upgrade', 'database',
|
|||
Kernel.exit 0
|
||||
end
|
||||
|
||||
if progress_message(
|
||||
'Checking for a newer version of PostgreSQL to install') do
|
||||
upgrade_version && Dir.exist?("#{INST_DIR}/#{upgrade_version}")
|
||||
end
|
||||
log "Upgrading PostgreSQL to #{upgrade_version}"
|
||||
else
|
||||
$stderr.puts 'No new version of PostgreSQL installed, nothing to upgrade to'
|
||||
Kernel.exit 0
|
||||
end
|
||||
|
||||
unless progress_message(
|
||||
'Checking if PostgreSQL bin files are symlinked to the expected location'
|
||||
) do
|
||||
|
|
Loading…
Reference in New Issue