[Windows] Add Service Fabric SDK to Software Report (#4563)

This commit is contained in:
Nikolay Frolov
2021-11-23 21:01:37 +03:00
committed by GitHub
parent 0c030e3e07
commit 870d8506f2
3 changed files with 11 additions and 1 deletions

View File

@@ -120,7 +120,8 @@ $toolsList = @(
) )
if ((Test-IsWin16) -or (Test-IsWin19)) { if ((Test-IsWin16) -or (Test-IsWin19)) {
$toolsList += @( $toolsList += @(
(Get-GoogleCloudSDKVersion) (Get-GoogleCloudSDKVersion),
(Get-ServiceFabricSDKVersion)
) )
} }
$markdown += New-MDList -Style Unordered -Lines ($toolsList | Sort-Object) $markdown += New-MDList -Style Unordered -Lines ($toolsList | Sort-Object)

View File

@@ -249,6 +249,11 @@ function Get-GoogleCloudSDKVersion {
(gcloud --version) -match "Google Cloud SDK" (gcloud --version) -match "Google Cloud SDK"
} }
function Get-ServiceFabricSDKVersion {
$serviceFabricSDKVersion = Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\Service Fabric\' -Name FabricVersion
return "Service Fabric SDK $serviceFabricSDKVersion"
}
function Get-NewmanVersion { function Get-NewmanVersion {
return "Newman $(newman --version)" return "Newman $(newman --version)"
} }

View File

@@ -134,6 +134,10 @@ Describe "ServiceFabricSDK" -Skip:(Test-IsWin22) {
It "PowerShell Module" { It "PowerShell Module" {
Get-Module -Name ServiceFabric -ListAvailable | Should -Not -BeNullOrEmpty Get-Module -Name ServiceFabric -ListAvailable | Should -Not -BeNullOrEmpty
} }
It "ServiceFabricSDK version" {
Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\Service Fabric\' -Name FabricVersion | Should -Not -BeNullOrEmpty
}
} }
Describe "Stack" { Describe "Stack" {