Skip to content
Snippets Groups Projects
Commit e69013b4 authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Use an array to generate messages on updated items.

parent 49ea7179
No related branches found
No related tags found
No related merge requests found
...@@ -568,6 +568,7 @@ Exit-IfDirMissing $UploadPathLogs "log file target" ...@@ -568,6 +568,7 @@ Exit-IfDirMissing $UploadPathLogs "log file target"
# terminates the entire script: # terminates the entire script:
Upload-LogFiles Upload-LogFiles
$UpdItems = @()
$ConfigShouldBeUpdated = NewConfig-Available $ConfigPath $ConfigShouldBeUpdated = NewConfig-Available $ConfigPath
$ServiceShouldBeUpdated = ServiceUpdate-Requested $ServiceShouldBeUpdated = ServiceUpdate-Requested
if (-Not ($ConfigShouldBeUpdated -Or $ServiceShouldBeUpdated)) { if (-Not ($ConfigShouldBeUpdated -Or $ServiceShouldBeUpdated)) {
...@@ -579,13 +580,15 @@ if (-Not ($ConfigShouldBeUpdated -Or $ServiceShouldBeUpdated)) { ...@@ -579,13 +580,15 @@ if (-Not ($ConfigShouldBeUpdated -Or $ServiceShouldBeUpdated)) {
$ConfigToTest = $ConfigPath $ConfigToTest = $ConfigPath
if ($ConfigShouldBeUpdated) { if ($ConfigShouldBeUpdated) {
$ConfigToTest = $UpdPathConfig $ConfigToTest = $UpdPathConfig
$UpdItems += "configuration files"
} }
# define which configuration checker executable should be used for testing: # define which configuration checker executable should be used for testing:
$ConfigTestBinary = "$($InstallationPath)\AutoTxConfigTest.exe" $ConfigTestBinary = "$($InstallationPath)\AutoTxConfigTest.exe"
if ($ServiceShouldBeUpdated) { if ($ServiceShouldBeUpdated) {
$UpdPackage = Find-InstallationPackage $UpdPackage = Find-InstallationPackage
$ConfigTestBinary = "$($UpdPackage)\AutoTx\AutoTxConfigTest.exe" $ConfigTestBinary = "$($UpdPackage)\$($ServiceName)\AutoTxConfigTest.exe"
$UpdItems += "service binaries"
} }
# now we're all set and can run the config test: # now we're all set and can run the config test:
...@@ -607,7 +610,7 @@ if (-Not ($ConfigValid)) { ...@@ -607,7 +610,7 @@ if (-Not ($ConfigValid)) {
# (1) something needs to be updated (config, service or both) # (1) something needs to be updated (config, service or both)
# AND # AND
# (2) the configuration validates with the corresponding service version # (2) the configuration validates with the corresponding service version
$UpdSummary = "" Write-Verbose "Required update action items:`n> - $($UpdItems -join "`n> - ")`n"
if ($ConfigShouldBeUpdated) { if ($ConfigShouldBeUpdated) {
$ConfigUpdated = Update-Configuration $ConfigUpdated = Update-Configuration
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment