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
4 changes: 2 additions & 2 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
}

if ((Test-Path -Path $notesPath) -and -not [string]::IsNullOrWhiteSpace((Get-Content -Path $notesPath -Raw))) {
gh release create $tagName @preReleaseFlag --notes-file $notesPath
gh release create $tagName @preReleaseFlag --title $tagName --notes-file $notesPath
} else {
gh release create $tagName @preReleaseFlag --generate-notes
gh release create $tagName @preReleaseFlag --title $tagName --generate-notes
}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

If you contributed one of these and there's no credit in the line PR to add it or let me know!

## 2026-04-30 - Version 1.23.3

* Fix release packaging layout so `Public`, `Private`, `Classes`, and `Data` remain wrapped as top-level folders in module output.
* Add meta test coverage to guard against output structure regressions in build packaging.

## 2026-04-29 - Version 1.23.2

* Fix `Invoke-HaloBatchProcessor` parallel runspace error where `Invoke-HaloBatchItem` was not recognised; private function is now invoked via `Module.Invoke()` within the imported module scope.
Expand Down
3 changes: 2 additions & 1 deletion DevOps/Build/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ function Build {
foreach ($pathToCopy in $pathsToCopy) {
$sourcePath = Join-Path -Path $RepoRoot -ChildPath $pathToCopy
if (Test-Path -Path $sourcePath -PathType Container) {
Copy-Item -Path (Join-Path -Path $sourcePath -ChildPath '*') -Destination $moduleOutputPath -Recurse -Force
# Copy each top-level source folder as a folder to preserve module layout in release output.
Copy-Item -Path $sourcePath -Destination $moduleOutputPath -Recurse -Force
}
}

Expand Down
4 changes: 2 additions & 2 deletions HaloAPI.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = '.\HaloAPI.psm1'

# Version number of this module.
ModuleVersion = '1.23.2'
ModuleVersion = '1.23.3'

# Supported PSEditions
CompatiblePSEditions = @('Core')
Expand Down Expand Up @@ -316,7 +316,7 @@
IconUri = 'https://3c3br937rz386088k2z3qqdi-wpengine.netdna-ssl.com/wp-content/uploads/2020/04/HaloIcon-300x300.png'

# ReleaseNotes of this module
ReleaseNotes = 'https://github.com/homotechsual/HaloAPI/releases/tag/1.22.1'
ReleaseNotes = 'https://github.com/homotechsual/HaloAPI/releases/tag/1.23.3'

# Prerelease string of this module
# Prerelease = 'Beta1'
Expand Down
19 changes: 19 additions & 0 deletions Tests/HaloAPI.Meta.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,23 @@ Describe 'Quality test entrypoint suite parsing' {
It 'splits comma-delimited suite values' {
$Script:QualityTestScriptContent | Should -Match '-split\s+''\\s\*,\\s\*'''
}
}

Describe 'Build output layout' {
BeforeAll {
$Script:BuildScriptPath = Join-Path -Path $ModulePath -ChildPath 'DevOps\Build\build.ps1'
$Script:BuiltModulePath = Join-Path -Path $ModulePath -ChildPath 'Output\HaloAPI'
Comment on lines +93 to +94

Copilot AI Apr 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using Windows-style backslashes inside -ChildPath makes these paths incorrect on non-Windows PowerShell (backslash is treated as a literal character, so the file/folder won’t be found). Use OS-agnostic path construction (e.g., Join-Path with multiple segments, [IO.Path]::Combine, or forward slashes) so the test passes on Linux/macOS runners.

Copilot uses AI. Check for mistakes.
}

It 'preserves wrapped top-level folders in packaged output' {
{
& $Script:BuildScriptPath -TaskNames @('clean', 'build')

Copilot AI Apr 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invoking the real build from the meta test can be slow and can leave artifacts (e.g., Output/) behind after tests run locally, which may cause flaky runs or dirty working trees. Consider adding an AfterAll cleanup for the output directory (or running the build into a temporary output path if the build script supports it) to keep the test suite isolated and repeatable.

Copilot uses AI. Check for mistakes.
} | Should -Not -Throw

$expectedDirectories = @('Public', 'Private', 'Classes', 'Data')
foreach ($expectedDirectory in $expectedDirectories) {
$expectedPath = Join-Path -Path $Script:BuiltModulePath -ChildPath $expectedDirectory
Test-Path -Path $expectedPath -PathType Container | Should -BeTrue
}
Comment on lines +102 to +106

Copilot AI Apr 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assertion only checks that the directories exist; it could still pass if the build accidentally flattens files into the module root while also creating empty (or unrelated) directories. To better guard against the original regression, also assert that expected content is nested (e.g., each directory contains at least one file) and/or that the module root does not contain files that should live under Public/Private/Classes/Data.

Copilot uses AI. Check for mistakes.
}
}