From 75fbd1c6490876068f1a8c6ba402646453a5996d Mon Sep 17 00:00:00 2001 From: Gilbert Sanchez Date: Mon, 13 Apr 2026 10:54:46 -0700 Subject: [PATCH] Bump psake to 5.0.0 and drop alpha1 prerelease tag - requirements.psd1: psake 4.9.1 -> 5.0.0 for GitHubActions output format - build.ps1: wire OutputFormat=GitHubActions when running under GITHUB_ACTIONS; reformat param splats/brace style - Plaster.psd1: remove 'alpha1' prerelease tag ahead of stable release Co-Authored-By: Claude Opus 4.6 --- Plaster/Plaster.psd1 | 2 +- build.ps1 | 45 +++++++++++++++++++++++--------------------- requirements.psd1 | 4 ++-- 3 files changed, 27 insertions(+), 24 deletions(-) diff --git a/Plaster/Plaster.psd1 b/Plaster/Plaster.psd1 index 26805fa..47ed329 100644 --- a/Plaster/Plaster.psd1 +++ b/Plaster/Plaster.psd1 @@ -15,7 +15,7 @@ # PSData hashtable with additional module metadata used by PowerShell. PrivateData = @{ PSData = @{ - Prerelease = 'alpha1' + # Prerelease = '' # Tags applied to this module. These help with module discovery in online galleries. Tags = @('Plaster', 'CodeGenerator', 'Scaffold', 'Template', 'JSON', 'PowerShell7') diff --git a/build.ps1 b/build.ps1 index dfbc85b..2e1aa2e 100644 --- a/build.ps1 +++ b/build.ps1 @@ -25,10 +25,9 @@ param( param($Command, $Parameter, $WordToComplete, $CommandAst, $FakeBoundParams) try { Get-PSakeScriptTasks -BuildFile './psakeFile.ps1' -ErrorAction 'Stop' | - Where-Object { $_.Name -like "$WordToComplete*" } | - Select-Object -ExpandProperty 'Name' - } - catch { + Where-Object { $_.Name -like "$WordToComplete*" } | + Select-Object -ExpandProperty 'Name' + } catch { @() } })] @@ -59,10 +58,10 @@ if ($Bootstrap) { Select-Object -First 1 $powerShellGetModuleParameters = @{ - Name = 'PowerShellGet' + Name = 'PowerShellGet' MinimumVersion = '2.0.0' MaximumVersion = '2.99.99' - Force = $true + Force = $true } if (-not $powerShellGetModule) { @@ -77,12 +76,12 @@ if ($Bootstrap) { # Try-import-first pattern $psDependParameters = @{ - Path = $PSScriptRoot - Recurse = $False + Path = $PSScriptRoot + Recurse = $False WarningAction = 'SilentlyContinue' - Import = $True - Force = $True - ErrorAction = 'Stop' + Import = $True + Force = $True + ErrorAction = 'Stop' } $importSucceeded = $false @@ -90,8 +89,7 @@ if ($Bootstrap) { Invoke-PSDepend @psDependParameters $importSucceeded = $true Write-Verbose 'Successfully imported existing modules.' -Verbose - } - catch { + } catch { Write-Verbose "Could not import all required modules: $_" -Verbose Write-Verbose 'Attempting to install missing or outdated dependencies...' -Verbose } @@ -99,8 +97,7 @@ if ($Bootstrap) { if (-not $importSucceeded) { try { Invoke-PSDepend @psDependParameters -Install - } - catch { + } catch { Write-Error "Failed to install and import required dependencies: $_" Write-Error 'This may be due to locked module files. Please restart the build environment or clear module locks.' if ($_.Exception.InnerException) { @@ -109,8 +106,7 @@ if ($Bootstrap) { throw } } -} -else { +} else { if (-not (Get-Module -Name 'PSDepend' -ListAvailable)) { throw 'Missing dependencies. Please run with the "-Bootstrap" flag to install dependencies.' } @@ -118,11 +114,18 @@ else { } if ($PSCmdlet.ParameterSetName -eq 'Help') { - Get-PSakeScriptTasks -buildFile $psakeFile | + Get-PSakeScriptTasks -BuildFile $psakeFile | Format-Table -Property Name, Description, Alias, DependsOn -} -else { +} else { Set-BuildEnvironment -Force - Invoke-psake -buildFile $psakeFile -taskList $Task -nologo + $invokepsakeSplat = @{ + BuildFile = $psakeFile + TaskList = $Task + NoLogo = $true + } + if ($Env:GITHUB_ACTIONS) { + $invokepsakeSplat['OutputFormat'] = 'GitHubActions' + } + Invoke-Psake @invokepsakeSplat exit ([int](-not $psake.build_success)) } diff --git a/requirements.psd1 b/requirements.psd1 index 50a294e..9cf0475 100644 --- a/requirements.psd1 +++ b/requirements.psd1 @@ -12,7 +12,7 @@ } } 'psake' = @{ - Version = '4.9.1' + Version = '5.0.0' } 'BuildHelpers' = @{ Version = '2.0.16' @@ -23,4 +23,4 @@ 'PSScriptAnalyzer' = @{ Version = '1.24.0' } -} \ No newline at end of file +}