mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 22:05:17 +00:00
syntax notation
This commit is contained in:
@@ -103,15 +103,15 @@ function Get-VSExtensionVersion
|
|||||||
Param
|
Param
|
||||||
(
|
(
|
||||||
[Parameter(Mandatory=$true)]
|
[Parameter(Mandatory=$true)]
|
||||||
[string] $packageName
|
[string] $PackageName
|
||||||
)
|
)
|
||||||
|
|
||||||
$state = Get-Content -Path (Join-Path (Get-VisualStudioInstancePath) '\state.packages.json') | ConvertFrom-Json
|
$state = Get-Content -Path (Join-Path (Get-VisualStudioInstancePath) '\state.packages.json') | ConvertFrom-Json
|
||||||
$packageVersion = ($state.packages | Where-Object { $_.id -eq $packageName }).version
|
$packageVersion = ($state.packages | Where-Object { $_.id -eq $PackageName }).version
|
||||||
|
|
||||||
if (-not $packageVersion)
|
if (-not $packageVersion)
|
||||||
{
|
{
|
||||||
Write-Host "installed package $packageName for Visual Studio 2019 was not found"
|
Write-Host "installed package $PackageName for Visual Studio 2019 was not found"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,15 +26,15 @@ function Get-VisualStudioExtensions {
|
|||||||
$wixExtensionVersion = ((Get-VisualStudioProduct -ProductType "VisualStudio").Packages | Where-Object {$_.Id -match 'WixToolset.VisualStudioExtension.Dev' -and $_.type -eq 'vsix'}).Version
|
$wixExtensionVersion = ((Get-VisualStudioProduct -ProductType "VisualStudio").Packages | Where-Object {$_.Id -match 'WixToolset.VisualStudioExtension.Dev' -and $_.type -eq 'vsix'}).Version
|
||||||
|
|
||||||
# WDK
|
# WDK
|
||||||
$wdkPackageVersion = Get-VSExtensionVersion -packageName 'Microsoft.Windows.DriverKit'
|
$wdkPackageVersion = Get-VSExtensionVersion -PackageName 'Microsoft.Windows.DriverKit'
|
||||||
$wdkExtensionVersion = Get-WDKVersion
|
$wdkExtensionVersion = Get-WDKVersion
|
||||||
|
|
||||||
# SSDT
|
# SSDT
|
||||||
$analysisPackageVersion = Get-VSExtensionVersion -packageName '04a86fc2-dbd5-4222-848e-911638e487fe'
|
$analysisPackageVersion = Get-VSExtensionVersion -PackageName '04a86fc2-dbd5-4222-848e-911638e487fe'
|
||||||
$reportingPackageVersion = Get-VSExtensionVersion -packageName '717ad572-c4b7-435c-c166-c2969777f718'
|
$reportingPackageVersion = Get-VSExtensionVersion -PackageName '717ad572-c4b7-435c-c166-c2969777f718'
|
||||||
|
|
||||||
$integrationPackageName = ($vs -match "2019") ? '851E7A09-7B2B-4F06-A15D-BABFCB26B970' : 'D1B09713-C12E-43CC-9EF4-6562298285AB'
|
$integrationPackageName = ($vs -match "2019") ? '851E7A09-7B2B-4F06-A15D-BABFCB26B970' : 'D1B09713-C12E-43CC-9EF4-6562298285AB'
|
||||||
$integrationPackageVersion = Get-VSExtensionVersion -packageName $integrationPackageName
|
$integrationPackageVersion = Get-VSExtensionVersion -PackageName $integrationPackageName
|
||||||
|
|
||||||
$extensions = @(
|
$extensions = @(
|
||||||
@{Package = 'SSDT Microsoft Analysis Services Projects'; Version = $analysisPackageVersion}
|
@{Package = 'SSDT Microsoft Analysis Services Projects'; Version = $analysisPackageVersion}
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ Describe "SSDTExtensions" {
|
|||||||
)
|
)
|
||||||
|
|
||||||
It "Extensions id=<id>" -TestCases $testExtenions {
|
It "Extensions id=<id>" -TestCases $testExtenions {
|
||||||
$version = Get-VSExtensionVersion -packageName "${id}"
|
$version = Get-VSExtensionVersion -PackageName "${id}"
|
||||||
$version | Should -Not -BeNullOrEmpty
|
$version | Should -Not -BeNullOrEmpty
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
It "Extension SSDT" {
|
It "Extension SSDT" {
|
||||||
$version = Get-VSExtensionVersion -packageName "SSDT"
|
$version = Get-VSExtensionVersion -PackageName "SSDT"
|
||||||
$version | Should -Not -BeNullOrEmpty
|
$version | Should -Not -BeNullOrEmpty
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Describe "WDK" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
It "WDK version from system" {
|
It "WDK version from system" {
|
||||||
$version = Get-VSExtensionVersion -packageName "Microsoft.Windows.DriverKit"
|
$version = Get-VSExtensionVersion -PackageName "Microsoft.Windows.DriverKit"
|
||||||
$version | Should -Not -BeNullOrEmpty
|
$version | Should -Not -BeNullOrEmpty
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ Describe "Wix" {
|
|||||||
It "Wix Toolset version from system" {
|
It "Wix Toolset version from system" {
|
||||||
if (Test-IsWin19)
|
if (Test-IsWin19)
|
||||||
{
|
{
|
||||||
$exVersion = Get-VSExtensionVersion -packageName "WixToolset.VisualStudioExtension.Dev16"
|
$exVersion = Get-VSExtensionVersion -PackageName "WixToolset.VisualStudioExtension.Dev16"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$exVersion = Get-VSExtensionVersion -packageName "WixToolset.VisualStudioExtension.Dev15"
|
$exVersion = Get-VSExtensionVersion -PackageName "WixToolset.VisualStudioExtension.Dev15"
|
||||||
}
|
}
|
||||||
$exVersion | Should -Not -BeNullOrEmpty
|
$exVersion | Should -Not -BeNullOrEmpty
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user