Skip to content

Commit

Permalink
Fix build (#3539)
Browse files Browse the repository at this point in the history
* Add pack step, and revert package cleanup

* Split publish and pack for vsix to get all dlls in place.

* Make manifest it's own Manifest step.
  • Loading branch information
nohwnd committed Apr 12, 2023
1 parent e39e94a commit e997752
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions scripts/build.ps1
Expand Up @@ -51,7 +51,7 @@ Param(
[Switch] $Force,

[Alias("s")]
[String[]] $Steps = @("InstallDotnet", "Restore", "UpdateLocalization", "Build", "Publish", "PrepareAcceptanceTests")
[String[]] $Steps = @("InstallDotnet", "Restore", "UpdateLocalization", "Build", "Publish", "Pack", "Manifest", "PrepareAcceptanceTests")
)

. $PSScriptRoot\common.lib.ps1
Expand Down Expand Up @@ -581,13 +581,10 @@ function Move-Loc-Files($sourceDir, $destinationDir, $dllName)
}
}

function Create-VsixPackage
{
Write-Log "Create-VsixPackage: Started."
function Publish-VsixPackage {
Write-Log "Publish-VsixPackage: Started."
$timer = Start-Timer

$vsixSourceDir = Join-Path $env:TP_ROOT_DIR "src\package\VSIXProject"
$vsixProjectDir = Join-Path $env:TP_OUT_DIR "$TPB_Configuration\VSIX"
$packageDir = Get-FullCLRPackageDirectory
$extensionsPackageDir = Join-Path $packageDir "Extensions"
$testImpactComComponentsDir = Join-Path $extensionsPackageDir "TestImpact"
Expand Down Expand Up @@ -670,10 +667,20 @@ function Create-VsixPackage
Copy-Item -Recurse $comComponentsDirectoryTIA\* $legacyTestImpactComComponentsDir -Force

Copy-Item (Join-Path $env:TP_PACKAGE_PROJ_DIR "ThirdPartyNotices.txt") $packageDir -Force

Write-Log "Publish-VsixPackage: Complete. {$(Get-ElapsedTime($timer))}"
}

function Create-VsixPackage {
Write-Log "Create-VsixPackage: Started."
$timer = Start-Timer

Write-Verbose "Locating MSBuild install path..."
$msbuildPath = Locate-MSBuildPath


$vsixSourceDir = Join-Path $env:TP_ROOT_DIR "src\package\VSIXProject"
$vsixProjectDir = Join-Path $env:TP_OUT_DIR "$TPB_Configuration\VSIX"

# Create vsix only when msbuild is installed.
if(![string]::IsNullOrEmpty($msbuildPath))
{
Expand Down Expand Up @@ -1084,11 +1091,15 @@ if ($Force -or $Steps -contains "Build") {

if ($Force -or $Steps -contains "Publish") {
Publish-Package
Publish-VsixPackage
}

if ($Force -or $Steps -contains "Pack") {
Create-VsixPackage
Create-NugetPackages
}

if ($Force -or $Steps -contains "Publish" -or $Steps -contains "Manifest") {
if ($Force -or $Steps -contains "Manifest") {
Generate-Manifest -PackageFolder $TPB_PackageOutDir
if (Test-Path $TPB_SourceBuildPackageOutDir)
{
Expand Down

0 comments on commit e997752

Please sign in to comment.