mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Skip build steps that do not have exe packages (#23945)
This commit is contained in:
@@ -205,7 +205,7 @@ jobs:
|
||||
Write-Verbose -Verbose "exePath: $exePath"
|
||||
|
||||
$enginePath = Join-Path -Path '$(System.ArtifactsDirectory)\unsignedEngine' -ChildPath engine.exe
|
||||
Expand-ExePackageEngine -ExePath $exePath -EnginePath $enginePath
|
||||
Expand-ExePackageEngine -ExePath $exePath -EnginePath $enginePath -ProductTargetArchitecture $runtime
|
||||
displayName: 'Make exe and expand package'
|
||||
|
||||
- task: onebranch.pipeline.signing@1
|
||||
@@ -217,14 +217,23 @@ jobs:
|
||||
search_root: '$(Pipeline.Workspace)'
|
||||
|
||||
- pwsh: |
|
||||
$runtime = '$(Runtime)'
|
||||
Write-Verbose -Verbose "runtime = '$(Runtime)'"
|
||||
$repoRoot = "$env:REPOROOT"
|
||||
Import-Module "$repoRoot\build.psm1"
|
||||
Import-Module "$repoRoot\tools\packaging"
|
||||
|
||||
$noExeRuntimes = @('fxdependent', 'fxdependentWinDesktop', 'minsize')
|
||||
|
||||
if ($runtime -in $noExeRuntimes) {
|
||||
Write-Verbose -Verbose "No EXE generated for $runtime"
|
||||
return
|
||||
}
|
||||
|
||||
$exePath = '$(exePath)'
|
||||
$enginePath = Join-Path -Path '$(System.ArtifactsDirectory)\unsignedEngine' -ChildPath engine.exe
|
||||
$enginePath | Get-AuthenticodeSignature | out-string | Write-Verbose -verbose
|
||||
Compress-ExePackageEngine -ExePath $exePath -EnginePath $enginePath
|
||||
Compress-ExePackageEngine -ExePath $exePath -EnginePath $enginePath -ProductTargetArchitecture $runtime
|
||||
displayName: Compress signed exe package
|
||||
|
||||
- task: onebranch.pipeline.signing@1
|
||||
|
||||
@@ -3598,7 +3598,12 @@ function Expand-ExePackageEngine {
|
||||
# Location to put the expanded engine.
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]
|
||||
$EnginePath
|
||||
$EnginePath,
|
||||
|
||||
[Parameter(Mandatory = $true)]
|
||||
[ValidateSet("x86", "x64", "arm64")]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string] $ProductTargetArchitecture
|
||||
)
|
||||
|
||||
<#
|
||||
@@ -3606,7 +3611,7 @@ function Expand-ExePackageEngine {
|
||||
insignia -ib TestInstaller.exe -o engine.exe
|
||||
#>
|
||||
|
||||
$wixPaths = Get-WixPath
|
||||
$wixPaths = Get-WixPath -IsProductArchitectureArm ($ProductTargetArchitecture -eq "arm64")
|
||||
|
||||
$resolvedExePath = (Resolve-Path -Path $ExePath).ProviderPath
|
||||
$resolvedEnginePath = [System.IO.Path]::GetFullPath($EnginePath)
|
||||
@@ -3628,7 +3633,12 @@ function Compress-ExePackageEngine {
|
||||
# Location of the signed engine
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]
|
||||
$EnginePath
|
||||
$EnginePath,
|
||||
|
||||
[Parameter(Mandatory = $true)]
|
||||
[ValidateSet("x86", "x64", "arm64")]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string] $ProductTargetArchitecture
|
||||
)
|
||||
|
||||
|
||||
@@ -3637,7 +3647,7 @@ function Compress-ExePackageEngine {
|
||||
insignia -ab engine.exe TestInstaller.exe -o TestInstaller.exe
|
||||
#>
|
||||
|
||||
$wixPaths = Get-WixPath
|
||||
$wixPaths = Get-WixPath -IsProductArchitectureArm ($ProductTargetArchitecture -eq "arm64")
|
||||
|
||||
$resolvedEnginePath = (Resolve-Path -Path $EnginePath).ProviderPath
|
||||
$resolvedExePath = (Resolve-Path -Path $ExePath).ProviderPath
|
||||
|
||||
Reference in New Issue
Block a user