Skip to content

Commit 3aedffe

Browse files
committed
Fix publish staging path and release v0.1.4
1 parent 9a78ec1 commit 3aedffe

File tree

4 files changed

+29
-17
lines changed

4 files changed

+29
-17
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ All notable changes to this project are documented in this file.
44

55
The format is based on Keep a Changelog and the project uses Semantic Versioning.
66

7+
## [0.1.4] - 2026-02-20
8+
9+
### Fixed
10+
11+
- Publish pipeline packaging layout for PSGallery:
12+
- `tools/prepare-publish.ps1` now stages files under `<output>\git-aliases-extra\...`
13+
- script returns the module directory path (not the staging root), matching `Publish-Module -Path` expectations.
14+
- Module test coverage for publish staging updated to validate module-directory output shape.
15+
716
## [0.1.3] - 2026-02-20
817

918
### Added

git-aliases-extra.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@{
22
RootModule = 'git-aliases-extra.psm1'
3-
ModuleVersion = '0.1.3'
3+
ModuleVersion = '0.1.4'
44
GUID = 'a5c2859e-7dce-4853-9db5-8cb7927dbdda'
55
Author = 'PhysShell'
66
CompanyName = ''

tests/git-aliases-extra.Module.Tests.ps1

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,23 +90,25 @@ Describe 'git-aliases-extra tooling' {
9090
It 'prepares runtime-only publish layout' {
9191
$scriptPath = Join-Path $script:RepoRoot 'tools\prepare-publish.ps1'
9292
$stagingPath = Join-Path ([IO.Path]::GetTempPath()) ("gae-stage-{0}" -f [guid]::NewGuid().ToString('N'))
93+
$moduleName = 'git-aliases-extra'
9394

9495
try {
9596
$output = & $scriptPath -SourcePath $script:RepoRoot -OutputPath $stagingPath
96-
$output | Should -Be $stagingPath
97+
$expectedModulePath = Join-Path $stagingPath $moduleName
98+
$output | Should -Be $expectedModulePath
9799

98-
(Test-Path -LiteralPath (Join-Path $stagingPath 'git-aliases-extra.psd1')) | Should -BeTrue
99-
(Test-Path -LiteralPath (Join-Path $stagingPath 'git-aliases-extra.psm1')) | Should -BeTrue
100-
(Test-Path -LiteralPath (Join-Path $stagingPath 'README.md')) | Should -BeTrue
101-
(Test-Path -LiteralPath (Join-Path $stagingPath 'LICENSE')) | Should -BeTrue
102-
(Test-Path -LiteralPath (Join-Path $stagingPath 'CHANGELOG.md')) | Should -BeTrue
103-
(Test-Path -LiteralPath (Join-Path $stagingPath 'assets\icon.png')) | Should -BeTrue
100+
(Test-Path -LiteralPath (Join-Path $expectedModulePath 'git-aliases-extra.psd1')) | Should -BeTrue
101+
(Test-Path -LiteralPath (Join-Path $expectedModulePath 'git-aliases-extra.psm1')) | Should -BeTrue
102+
(Test-Path -LiteralPath (Join-Path $expectedModulePath 'README.md')) | Should -BeTrue
103+
(Test-Path -LiteralPath (Join-Path $expectedModulePath 'LICENSE')) | Should -BeTrue
104+
(Test-Path -LiteralPath (Join-Path $expectedModulePath 'CHANGELOG.md')) | Should -BeTrue
105+
(Test-Path -LiteralPath (Join-Path $expectedModulePath 'assets\icon.png')) | Should -BeTrue
104106

105-
(Test-Path -LiteralPath (Join-Path $stagingPath 'tests')) | Should -BeFalse
106-
(Test-Path -LiteralPath (Join-Path $stagingPath 'tools')) | Should -BeFalse
107-
(Test-Path -LiteralPath (Join-Path $stagingPath '.github')) | Should -BeFalse
107+
(Test-Path -LiteralPath (Join-Path $expectedModulePath 'tests')) | Should -BeFalse
108+
(Test-Path -LiteralPath (Join-Path $expectedModulePath 'tools')) | Should -BeFalse
109+
(Test-Path -LiteralPath (Join-Path $expectedModulePath '.github')) | Should -BeFalse
108110

109-
{ Test-ModuleManifest -Path (Join-Path $stagingPath 'git-aliases-extra.psd1') -ErrorAction Stop } |
111+
{ Test-ModuleManifest -Path (Join-Path $expectedModulePath 'git-aliases-extra.psd1') -ErrorAction Stop } |
110112
Should -Not -Throw
111113
} finally {
112114
Remove-Item -LiteralPath $stagingPath -Recurse -Force -ErrorAction SilentlyContinue

tools/prepare-publish.ps1

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ if (Test-Path -LiteralPath $OutputPath) {
3030
Remove-Item -LiteralPath $OutputPath -Recurse -Force
3131
}
3232

33-
New-Item -ItemType Directory -Path $OutputPath -Force | Out-Null
33+
$moduleOutputPath = Join-Path $OutputPath $manifest.Name
34+
New-Item -ItemType Directory -Path $moduleOutputPath -Force | Out-Null
3435

3536
$filesToCopy = @(
3637
'git-aliases-extra.psd1',
@@ -46,7 +47,7 @@ foreach ($relativePath in $filesToCopy) {
4647
throw "Required publish file missing: $relativePath"
4748
}
4849

49-
$destination = Join-Path $OutputPath $relativePath
50+
$destination = Join-Path $moduleOutputPath $relativePath
5051
$destinationDir = Split-Path -Parent $destination
5152
if ($destinationDir -and -not (Test-Path -LiteralPath $destinationDir)) {
5253
New-Item -ItemType Directory -Path $destinationDir -Force | Out-Null
@@ -62,9 +63,9 @@ foreach ($dirName in $optionalDirs) {
6263
continue
6364
}
6465

65-
Copy-Item -LiteralPath $sourceDir -Destination (Join-Path $OutputPath $dirName) -Recurse -Force
66+
Copy-Item -LiteralPath $sourceDir -Destination (Join-Path $moduleOutputPath $dirName) -Recurse -Force
6667
}
6768

68-
Test-ModuleManifest -Path (Join-Path $OutputPath 'git-aliases-extra.psd1') -ErrorAction Stop | Out-Null
69+
Test-ModuleManifest -Path (Join-Path $moduleOutputPath 'git-aliases-extra.psd1') -ErrorAction Stop | Out-Null
6970

70-
$OutputPath
71+
$moduleOutputPath

0 commit comments

Comments
 (0)