[release/v7.4] Improve ADO package build and validation across platforms by TravisEz13 · Pull Request #26405 · PowerShell/PowerShell · GitHub
Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/macos-ci.yml
8 changes: 5 additions & 3 deletions .pipelines/templates/mac-package-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ jobs:
}

$pkgNameFilter = "powershell-*$macosRuntime.pkg"
Write-Verbose -Verbose "Looking for pkg packages with filter: $pkgNameFilter in '$(Pipeline.Workspace)' to upload..."
$pkgPath = Get-ChildItem -Path $(Pipeline.Workspace) -Filter $pkgNameFilter -Recurse -File

foreach($p in $pkgPath) {
Expand All @@ -141,6 +142,7 @@ jobs:

Start-PSPackage -Type tar -SkipReleaseChecks -MacOSRuntime $macosRuntime -ReleaseTag $(ReleaseTagVar) -PackageBinPath $signedFilesPath -LTS:$LTS
$tarPkgNameFilter = "powershell-*$macosRuntime.tar.gz"
Write-Verbose -Verbose "Looking for tar packages with filter: $tarPkgNameFilter in '$(Pipeline.Workspace)' to upload..."
$tarPkgPath = Get-ChildItem -Path $(Pipeline.Workspace) -Filter $tarPkgNameFilter -Recurse -File

foreach($t in $tarPkgPath) {
Expand Down Expand Up @@ -220,14 +222,14 @@ jobs:

- pwsh: |
$signedPkg = Get-ChildItem -Path $(Pipeline.Workspace) -Filter "*osx*.zip" -File

$signedPkg | ForEach-Object {
Write-Verbose -Verbose "Signed package zip: $_"

if (-not (Test-Path $_)) {
throw "Package not found: $_"
}

if (-not (Test-Path $(ob_outputDirectory))) {
$null = New-Item -Path $(ob_outputDirectory) -ItemType Directory
}
Expand Down
11 changes: 8 additions & 3 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -2381,17 +2381,22 @@ function Start-PSBootstrap {
Start-NativeExecution -sb ([ScriptBlock]::Create("$sudo $PackageManager install -y rpm-build")) -IgnoreExitcode
}
}

# For Debian-based systems and Mariner, ensure dpkg-deb is available
if ($environment.IsLinux -and ($environment.IsDebianFamily -or $environment.IsMariner)) {
Write-Verbose -Verbose "Checking for dpkg-deb..."
if (!(Get-Command dpkg-deb -ErrorAction SilentlyContinue)) {
Write-Warning "dpkg-deb not found. Installing dpkg package..."
if ($environment.IsMariner) {
# For Mariner (Azure Linux), install the extended repo first to access dpkg.
Write-Verbose -verbose "BEGIN: /etc/os-release content:"
Get-Content /etc/os-release | Write-Verbose -verbose
Write-Verbose -verbose "END: /etc/os-release content"

Write-Verbose -Verbose "Installing azurelinux-repos-extended for Mariner..."
Start-NativeExecution -sb ([ScriptBlock]::Create("$sudo $PackageManager install -y azurelinux-repos-extended")) -IgnoreExitcode
Start-NativeExecution -sb ([ScriptBlock]::Create("$sudo $PackageManager install -y dpkg")) -IgnoreExitcode

Start-NativeExecution -sb ([ScriptBlock]::Create("$sudo $PackageManager azurelinux-repos-extended")) -IgnoreExitcode -Verbose
Start-NativeExecution -sb ([ScriptBlock]::Create("$sudo $PackageManager dpkg")) -IgnoreExitcode -Verbose
} else {
Start-NativeExecution -sb ([ScriptBlock]::Create("$sudo apt-get install -y dpkg")) -IgnoreExitcode
}
Expand Down
Loading
Loading