[Windows] Fix mingw related lines in software report (#8389)

This commit is contained in:
Vasilii Polikarpov
2023-09-28 09:56:05 +02:00
committed by GitHub
parent 5e9e8cd16d
commit 62e9da75e7
2 changed files with 17 additions and 3 deletions

View File

@@ -86,7 +86,9 @@ $tools.AddToolVersion("jq", $(Get-JQVersion))
$tools.AddToolVersion("Kind", $(Get-KindVersion))
$tools.AddToolVersion("Kubectl", $(Get-KubectlVersion))
$tools.AddToolVersion("Mercurial", $(Get-MercurialVersion))
$tools.AddToolVersion("Mingw-w64", $(Get-MinGWVersion))
$tools.AddToolVersion("gcc", $(Get-GCCVersion))
$tools.AddToolVersion("gdb", $(Get-GDBVersion))
$tools.AddToolVersion("GNU Binutils", $(Get-GNUBinutilsVersion))
$tools.AddToolVersion("Newman", $(Get-NewmanVersion))
$tools.AddToolVersion("NSIS", $(Get-NSISVersion))
$tools.AddToolVersion("OpenSSL", $(Get-OpenSSLVersion))

View File

@@ -107,8 +107,20 @@ function Get-KindVersion {
return $kindVersion
}
function Get-MinGWVersion {
(gcc --version | Select-String -Pattern "MinGW-W64") -match "(?<version>\d+\.\d+\.\d+)" | Out-Null
function Get-GCCVersion {
(gcc --version | Select-String -Pattern "gcc.exe") -match "(?<version>\d+\.\d+\.\d+)" | Out-Null
$mingwVersion = $Matches.Version
return $mingwVersion
}
function Get-GDBVersion {
(gdb --version | Select-String -Pattern "GNU gdb") -match "(?<version>\d+\.\d+)" | Out-Null
$mingwVersion = $Matches.Version
return $mingwVersion
}
function Get-GNUBinutilsVersion {
(ld --version | Select-String -Pattern "GNU Binutils") -match "(?<version>\d+\.\d+)" | Out-Null
$mingwVersion = $Matches.Version
return $mingwVersion
}