Improve table and tool versions comparison for new Software Report module (#6729)

This commit is contained in:
Maxim Lobanov
2022-12-13 16:54:41 +01:00
committed by GitHub
parent 656d9522e0
commit 6033af8dd1
8 changed files with 120 additions and 135 deletions

View File

@@ -18,7 +18,9 @@ Param (
[Parameter(Mandatory=$true)]
[string] $CurrentJsonReportPath,
[Parameter(Mandatory=$true)]
[string] $OutputFile
[string] $OutputFile,
[Parameter(Mandatory=$false)]
[string] $ImageDocsUrl
)
$ErrorActionPreference = "Stop"
@@ -45,4 +47,9 @@ $currentReport = Read-SoftwareReport -JsonReportPath $CurrentJsonReportPath
$comparer = [SoftwareReportComparer]::new($previousReport, $currentReport)
$comparer.CompareReports()
$diff = $comparer.GetMarkdownReport()
if ($ImageDocsUrl) {
$diff += "`n`n`n For comprehensive list of software installed on this image please click [here]($ImageDocsUrl)."
}
$diff | Out-File -Path $OutputFile -Encoding utf8NoBOM