Skip to content

Commit d70f707

Browse files
Bump psake to 5.0.0 and drop alpha1 prerelease tag (#451)
## Summary - Bump psake `4.9.1` -> `5.0.0` in `requirements.psd1` to enable the `GitHubActions` output format. - Wire `OutputFormat = 'GitHubActions'` in `build.ps1` when `GITHUB_ACTIONS` is set; tidy param splats and brace style. - Drop the `alpha1` prerelease tag from `Plaster.psd1` ahead of a stable release. ## Test plan - [x] `./build.ps1 -Bootstrap` succeeds with psake 5.0.0 installed - [x] `./build.ps1` runs default task locally (no GITHUB_ACTIONS env) - [ ] CI workflow produces GitHub Actions grouped output on push - [ ] Published module manifest has no prerelease tag Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent facec71 commit d70f707

File tree

3 files changed

+27
-24
lines changed

3 files changed

+27
-24
lines changed

Plaster/Plaster.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# PSData hashtable with additional module metadata used by PowerShell.
1616
PrivateData = @{
1717
PSData = @{
18-
Prerelease = 'alpha1'
18+
# Prerelease = ''
1919

2020
# Tags applied to this module. These help with module discovery in online galleries.
2121
Tags = @('Plaster', 'CodeGenerator', 'Scaffold', 'Template', 'JSON', 'PowerShell7')

build.ps1

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ param(
2525
param($Command, $Parameter, $WordToComplete, $CommandAst, $FakeBoundParams)
2626
try {
2727
Get-PSakeScriptTasks -BuildFile './psakeFile.ps1' -ErrorAction 'Stop' |
28-
Where-Object { $_.Name -like "$WordToComplete*" } |
29-
Select-Object -ExpandProperty 'Name'
30-
}
31-
catch {
28+
Where-Object { $_.Name -like "$WordToComplete*" } |
29+
Select-Object -ExpandProperty 'Name'
30+
} catch {
3231
@()
3332
}
3433
})]
@@ -59,10 +58,10 @@ if ($Bootstrap) {
5958
Select-Object -First 1
6059

6160
$powerShellGetModuleParameters = @{
62-
Name = 'PowerShellGet'
61+
Name = 'PowerShellGet'
6362
MinimumVersion = '2.0.0'
6463
MaximumVersion = '2.99.99'
65-
Force = $true
64+
Force = $true
6665
}
6766

6867
if (-not $powerShellGetModule) {
@@ -77,30 +76,28 @@ if ($Bootstrap) {
7776

7877
# Try-import-first pattern
7978
$psDependParameters = @{
80-
Path = $PSScriptRoot
81-
Recurse = $False
79+
Path = $PSScriptRoot
80+
Recurse = $False
8281
WarningAction = 'SilentlyContinue'
83-
Import = $True
84-
Force = $True
85-
ErrorAction = 'Stop'
82+
Import = $True
83+
Force = $True
84+
ErrorAction = 'Stop'
8685
}
8786

8887
$importSucceeded = $false
8988
try {
9089
Invoke-PSDepend @psDependParameters
9190
$importSucceeded = $true
9291
Write-Verbose 'Successfully imported existing modules.' -Verbose
93-
}
94-
catch {
92+
} catch {
9593
Write-Verbose "Could not import all required modules: $_" -Verbose
9694
Write-Verbose 'Attempting to install missing or outdated dependencies...' -Verbose
9795
}
9896

9997
if (-not $importSucceeded) {
10098
try {
10199
Invoke-PSDepend @psDependParameters -Install
102-
}
103-
catch {
100+
} catch {
104101
Write-Error "Failed to install and import required dependencies: $_"
105102
Write-Error 'This may be due to locked module files. Please restart the build environment or clear module locks.'
106103
if ($_.Exception.InnerException) {
@@ -109,20 +106,26 @@ if ($Bootstrap) {
109106
throw
110107
}
111108
}
112-
}
113-
else {
109+
} else {
114110
if (-not (Get-Module -Name 'PSDepend' -ListAvailable)) {
115111
throw 'Missing dependencies. Please run with the "-Bootstrap" flag to install dependencies.'
116112
}
117113
Invoke-PSDepend -Path $PSScriptRoot -Recurse $False -WarningAction 'SilentlyContinue' -Import -Force
118114
}
119115

120116
if ($PSCmdlet.ParameterSetName -eq 'Help') {
121-
Get-PSakeScriptTasks -buildFile $psakeFile |
117+
Get-PSakeScriptTasks -BuildFile $psakeFile |
122118
Format-Table -Property Name, Description, Alias, DependsOn
123-
}
124-
else {
119+
} else {
125120
Set-BuildEnvironment -Force
126-
Invoke-psake -buildFile $psakeFile -taskList $Task -nologo
121+
$invokepsakeSplat = @{
122+
BuildFile = $psakeFile
123+
TaskList = $Task
124+
NoLogo = $true
125+
}
126+
if ($Env:GITHUB_ACTIONS) {
127+
$invokepsakeSplat['OutputFormat'] = 'GitHubActions'
128+
}
129+
Invoke-Psake @invokepsakeSplat
127130
exit ([int](-not $psake.build_success))
128131
}

requirements.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
}
1414
'psake' = @{
15-
Version = '4.9.1'
15+
Version = '5.0.0'
1616
}
1717
'BuildHelpers' = @{
1818
Version = '2.0.16'
@@ -23,4 +23,4 @@
2323
'PSScriptAnalyzer' = @{
2424
Version = '1.24.0'
2525
}
26-
}
26+
}

0 commit comments

Comments
 (0)