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
2 changes: 1 addition & 1 deletion Header.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
RackStack - All-in-one Windows Server setup utility (Monolithic Build).

.DESCRIPTION
This is the MONOLITHIC BUILD -- all 78 modules combined into a single file.
This is the MONOLITHIC BUILD -- all 81 modules combined into a single file.
Generated by sync-to-monolithic.ps1 from the modular source in Modules/.
The .exe is compiled from this file via ps2exe.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<a href="https://www.bestpractices.dev/projects/12921"><img alt="OpenSSF Best Practices" src="https://www.bestpractices.dev/projects/12921/badge"></a>
<a href="https://codecov.io/gh/TheAbider/RackStack"><img alt="codecov" src="https://codecov.io/gh/TheAbider/RackStack/branch/master/graph/badge.svg"></a>
<img alt="PSScriptAnalyzer 0 errors" src="https://img.shields.io/badge/PSScriptAnalyzer-0%20errors-brightgreen">
<img alt="5493 structural tests" src="https://img.shields.io/badge/structural%20tests-5493-brightgreen">
<img alt="5495 structural tests" src="https://img.shields.io/badge/structural%20tests-5495-brightgreen">
<img alt="Pester 312 tests" src="https://img.shields.io/badge/Pester-312%20tests-brightgreen">
<img alt="SLSA Level 3" src="https://slsa.dev/images/gh-badge-level3.svg">
</p>
Expand Down
18 changes: 18 additions & 0 deletions Tests/Run-Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10651,6 +10651,24 @@ try {

# README test badge label is the specific 'structural tests' (distinct from the Pester badge).
Write-TestResult "DocFreshness: README test badge uses a specific label" ($readmeRaw -match 'structural%20tests|structural tests')

# Header.ps1's .DESCRIPTION states the module count, and it is the text that
# lands at the top of the shipped monolithic and therefore inside the EXE.
# It was NOT covered here and rotted to "all 78 modules" against a live 81.
#
# Scope matters: everything from the first .CHANGELOG onward is version
# history, where "64 modules, 1873 tests" is a true statement about v1.20.4.
# Asserting over the whole file would demand falsifying that history, so only
# the current-tense preamble is checked.
$headerRaw = Get-Content (Join-Path $script:ModuleRoot 'Header.ps1') -Raw
$firstChangelog = $headerRaw.IndexOf('.CHANGELOG')
$headerPreamble = if ($firstChangelog -gt 0) { $headerRaw.Substring(0, $firstChangelog) } else { $headerRaw }
Write-TestResult "DocFreshness: Header.ps1 preamble is separable from its changelog" `
($firstChangelog -gt 0) "no .CHANGELOG found — the check below would scan version history"
$hdrMod = @([regex]::Matches($headerPreamble, '(\d{2,4})\s+modules\b'))
$hdrStale = @($hdrMod | Where-Object { [int]$_.Groups[1].Value -ne $liveModuleCount })
Write-TestResult "DocFreshness: Header.ps1 module count == $liveModuleCount" `
($hdrStale.Count -eq 0) $(if ($hdrStale.Count) { "stale: $(($hdrStale | ForEach-Object { $_.Value }) -join ', ')" } else { "" })
}
catch {
Write-TestResult "Documentation Freshness Tests" $false $_.Exception.Message
Expand Down