mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2026-01-08 19:21:49 +08:00
Add SQL Server Data Tools extensions to VS2019 (#559)
* add extensions * add exe installation * change Reporting Services name * add switch to function, add validation * change install wdk to function * Fix template * fix scripts name * add quotes * more quotes * one more quotes * get rid of duplicate code * move quotes to function * small improvment to wix installation * add comment to validate extensions script
This commit is contained in:
@@ -5,39 +5,13 @@
|
||||
|
||||
Import-Module -Name ImageHelpers -Force
|
||||
|
||||
function Get-SSDTExtensionPackage {
|
||||
$vsProgramData = Get-Item -Path "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances"
|
||||
$instanceFolders = Get-ChildItem -Path $vsProgramData.FullName
|
||||
|
||||
if($instanceFolders -is [array])
|
||||
{
|
||||
Write-Host "More than one instance installed"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$stateContent = Get-Content -Path ($instanceFolders.FullName + '\state.packages.json')
|
||||
$state = $stateContent | ConvertFrom-Json
|
||||
$SsdtPackage = $state.packages | where { $_.id -eq "SSDT" }
|
||||
return $SsdtPackage
|
||||
}
|
||||
|
||||
|
||||
$SsdtPackage = Get-SSDTExtensionPackage
|
||||
|
||||
if($SsdtPackage){
|
||||
Write-Host "SSDT version" $SsdtPackage.version "installed"
|
||||
}
|
||||
else {
|
||||
Write-Host "SSDT is not installed"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$SSDTPackageVersion = Get-VSExtensionVersion -packageName "SSDT"
|
||||
|
||||
# Adding description of the software to Markdown
|
||||
$SoftwareName = "SQL Server Data Tools for VS 2017"
|
||||
|
||||
$Description = @"
|
||||
_Version:_ $($SsdtPackage.version)<br/>
|
||||
_Version:_ $SSDTPackageVersion<br/>
|
||||
|
||||
The following components are installed:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user