diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index c68dba37..1aef7533 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -109,7 +109,7 @@ jobs: gh release create "v$newVersion-$newPrereleaseTag" --target prerelease --generate-notes --prerelease # Publish prerelease docs - Install-Module HelpOut -Scope CurrentUser -Force + Install-Module HelpOut -Scope CurrentUser -RequiredVersion 0.5 -Force & .\PwshSpectreConsole.Docs\src\powershell\UpdateDocs.ps1 -NonInteractive git config --global user.name 'Shaun Lawrie (via GitHub Actions)' git config --global user.email 'shaun.r.lawrie@gmail.com' diff --git a/PwshSpectreConsole.Docs/src/powershell/Helpers.psm1 b/PwshSpectreConsole.Docs/src/powershell/Helpers.psm1 index d07b28da..0d1c9788 100644 --- a/PwshSpectreConsole.Docs/src/powershell/Helpers.psm1 +++ b/PwshSpectreConsole.Docs/src/powershell/Helpers.psm1 @@ -200,7 +200,7 @@ function Get-GitCommitDatesForHashFile { try { Set-Location $OutputPath $group = Get-Group -Name $Name - $hashfileName = "_" + ($doc.Name -replace '.md$', '.sha256') + $hashfileName = "_" + ($Name -replace '.md$', '.sha256') $gitHashfileName = Join-Path $group.Name $hashfileName Write-Host "Getting git log for $gitHashfileName in cwd $OutputPath" $dates = git log --follow --pretty="format:%ci" -- $gitHashfileName diff --git a/PwshSpectreConsole.Docs/src/powershell/UpdateDocs.ps1 b/PwshSpectreConsole.Docs/src/powershell/UpdateDocs.ps1 index 9fbe2195..25150941 100644 --- a/PwshSpectreConsole.Docs/src/powershell/UpdateDocs.ps1 +++ b/PwshSpectreConsole.Docs/src/powershell/UpdateDocs.ps1 @@ -8,6 +8,12 @@ param( $ErrorActionPreference = "Stop" +# The new version has a bug which is failing this on windows +$helpOut = Get-Module "HelpOut" -ListAvailable +if($helpOut.Version.ToString() -ne "0.5") { + throw "Must be run with HelpOut v0.5" +} + & "$PSScriptRoot\..\..\..\PwshSpectreConsole\Build.ps1" Import-Module "$PSScriptRoot\..\..\..\PwshSpectreConsole\PwshSpectreConsole.psd1" -Force @@ -52,6 +58,7 @@ foreach ($doc in $docs) { } # Update the hash files in git so the modified files can be detected +# I regret doing it this way but cbf changing it now Update-HashFilesInGit -StagingPath $stagingPath -OutputPath $outputPath # Format the files for astro