Skip to content

Commit 870d850

Browse files
[Windows] Add Service Fabric SDK to Software Report (#4563)
1 parent 0c030e3 commit 870d850

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ $toolsList = @(
120120
)
121121
if ((Test-IsWin16) -or (Test-IsWin19)) {
122122
$toolsList += @(
123-
(Get-GoogleCloudSDKVersion)
123+
(Get-GoogleCloudSDKVersion),
124+
(Get-ServiceFabricSDKVersion)
124125
)
125126
}
126127
$markdown += New-MDList -Style Unordered -Lines ($toolsList | Sort-Object)

images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,11 @@ function Get-GoogleCloudSDKVersion {
249249
(gcloud --version) -match "Google Cloud SDK"
250250
}
251251

252+
function Get-ServiceFabricSDKVersion {
253+
$serviceFabricSDKVersion = Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\Service Fabric\' -Name FabricVersion
254+
return "Service Fabric SDK $serviceFabricSDKVersion"
255+
}
256+
252257
function Get-NewmanVersion {
253258
return "Newman $(newman --version)"
254259
}

images/win/scripts/Tests/Tools.Tests.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ Describe "ServiceFabricSDK" -Skip:(Test-IsWin22) {
134134
It "PowerShell Module" {
135135
Get-Module -Name ServiceFabric -ListAvailable | Should -Not -BeNullOrEmpty
136136
}
137+
138+
It "ServiceFabricSDK version" {
139+
Get-ItemPropertyValue 'HKLM:\SOFTWARE\Microsoft\Service Fabric\' -Name FabricVersion | Should -Not -BeNullOrEmpty
140+
}
137141
}
138142

139143
Describe "Stack" {

0 commit comments

Comments
 (0)