Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build #3539

Merged
merged 7 commits into from
Apr 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
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")
)

$ErrorActionPreference = 'Stop'
Expand Down Expand Up @@ -759,12 +759,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 @@ -847,10 +845,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)) {
# Copy the vsix project to artifacts directory to modify manifest
Expand Down Expand Up @@ -1276,11 +1284,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
2 changes: 1 addition & 1 deletion scripts/verify-nupkgs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function Verify-Nuget-Packages($packageDirectory, $version)

# Don't remove the directories after you unpacked them
# they are useful for reviewing what is in the package.
# Remove-Item -Force -Recurse $unzipNugetPackageDir | Out-Null
Remove-Item -Force -Recurse $unzipNugetPackageDir | Out-Null
}

Write-Log "Completed Verify-Nuget-Packages."
Expand Down