@@ -29,13 +29,18 @@ Describe 'git-aliases-extra manifest' {
2929 $manifest.PrivateData.PSData.LicenseUri | Should -Match ' /LICENSE$'
3030 $manifest.PrivateData.PSData.IconUri | Should -Match ' /assets/icon\.png$'
3131 $manifest.PrivateData.PSData.ReleaseNotes | Should -Not - BeNullOrEmpty
32+ $manifest.PrivateData.PSData.ContainsKey (' ExternalModuleDependencies' ) | Should - BeFalse
3233 $manifest.Copyright | Should -Match ' \b\d{4}\b'
3334
34- $requiredModuleNames = @ ($manifest.RequiredModules | ForEach-Object {
35- if ($_ -is [string ]) { $_ } else { $_.ModuleName }
36- })
35+ $requiredModules = @ ($manifest.RequiredModules )
36+ $requiredModuleNames = @ ($requiredModules | ForEach-Object { $_.ModuleName })
3737 $requiredModuleNames | Should - Contain ' posh-git'
3838 $requiredModuleNames | Should - Contain ' git-aliases'
39+
40+ $poshGit = $requiredModules | Where-Object { $_.ModuleName -eq ' posh-git' } | Select-Object - First 1
41+ $gitAliases = $requiredModules | Where-Object { $_.ModuleName -eq ' git-aliases' } | Select-Object - First 1
42+ $poshGit.ModuleVersion | Should - Be ' 1.1.0'
43+ $gitAliases.ModuleVersion | Should - Be ' 0.3.8'
3944 }
4045}
4146
@@ -64,6 +69,7 @@ Describe 'git-aliases-extra tooling' {
6469 (Test-Path - LiteralPath (Join-Path $script :RepoRoot ' CHANGELOG.md' )) | Should - BeTrue
6570 (Test-Path - LiteralPath (Join-Path $script :RepoRoot ' assets\icon.png' )) | Should - BeTrue
6671 (Test-Path - LiteralPath (Join-Path $script :RepoRoot ' tools\get-release-notes.ps1' )) | Should - BeTrue
72+ (Test-Path - LiteralPath (Join-Path $script :RepoRoot ' tools\prepare-publish.ps1' )) | Should - BeTrue
6773 }
6874
6975 It ' resolves release notes from changelog for manifest version' {
@@ -73,4 +79,30 @@ Describe 'git-aliases-extra tooling' {
7379 $notes = & $scriptPath - Version $version
7480 $notes | Should -Not - BeNullOrEmpty
7581 }
82+
83+ It ' prepares runtime-only publish layout' {
84+ $scriptPath = Join-Path $script :RepoRoot ' tools\prepare-publish.ps1'
85+ $stagingPath = Join-Path ([IO.Path ]::GetTempPath()) (" gae-stage-{0}" -f [guid ]::NewGuid().ToString(' N' ))
86+
87+ try {
88+ $output = & $scriptPath - SourcePath $script :RepoRoot - OutputPath $stagingPath
89+ $output | Should - Be $stagingPath
90+
91+ (Test-Path - LiteralPath (Join-Path $stagingPath ' git-aliases-extra.psd1' )) | Should - BeTrue
92+ (Test-Path - LiteralPath (Join-Path $stagingPath ' git-aliases-extra.psm1' )) | Should - BeTrue
93+ (Test-Path - LiteralPath (Join-Path $stagingPath ' README.md' )) | Should - BeTrue
94+ (Test-Path - LiteralPath (Join-Path $stagingPath ' LICENSE' )) | Should - BeTrue
95+ (Test-Path - LiteralPath (Join-Path $stagingPath ' CHANGELOG.md' )) | Should - BeTrue
96+ (Test-Path - LiteralPath (Join-Path $stagingPath ' assets\icon.png' )) | Should - BeTrue
97+
98+ (Test-Path - LiteralPath (Join-Path $stagingPath ' tests' )) | Should - BeFalse
99+ (Test-Path - LiteralPath (Join-Path $stagingPath ' tools' )) | Should - BeFalse
100+ (Test-Path - LiteralPath (Join-Path $stagingPath ' .github' )) | Should - BeFalse
101+
102+ { Test-ModuleManifest - Path (Join-Path $stagingPath ' git-aliases-extra.psd1' ) - ErrorAction Stop } |
103+ Should -Not - Throw
104+ } finally {
105+ Remove-Item - LiteralPath $stagingPath - Recurse - Force - ErrorAction SilentlyContinue
106+ }
107+ }
76108}
0 commit comments