From c5d2a70bc92f2a357dd853089a213524b39cd141 Mon Sep 17 00:00:00 2001 From: Raimund Andree Date: Mon, 5 Oct 2026 03:02:16 +0200 Subject: [PATCH] chore(release): prepare 5.0.0-rc2 Set the prerelease label rc2, describe the module as a PowerShell module in the manifest, which the PowerShell Gallery shows, and keep the README free of a prerelease version, which outlives the release. Tests check the description, that the published 5.0.0-rc1 isn't reused, and the README. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: AI Assistant --- CHANGELOG.md | 3 +++ Docs/README.md | 4 ++-- NTFSSecurity/NTFSSecurity.psd1 | 4 ++-- Tests/Repository.Tests.ps1 | 29 ++++++++++++++++++++++++++++- 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e73cd7..ee5484a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,9 @@ The format is based on into the documentation, and complete the version history with the release dates from the PowerShell Gallery, the missing notes for 4.2.2, 4.2.5, and 4.2.6, and detailed notes for 4.2.4 +- Describe the module as a PowerShell module in the manifest, which the + PowerShell Gallery shows; it said Windows PowerShell, although the module + supports PowerShell 7 as well - Rename `-RemoveInheritedAccessRules` of `Disable-NTFSAuditInheritance` to `-RemoveInheritedAuditRules` and `-RemoveExplicitAccessRules` of `Enable-NTFSAuditInheritance` to `-RemoveExplicitAuditRules`, because they diff --git a/Docs/README.md b/Docs/README.md index 956b1c0..c2823ea 100644 --- a/Docs/README.md +++ b/Docs/README.md @@ -38,8 +38,8 @@ Install the module from the Install-Module -Name NTFSSecurity ``` -To try a prerelease of the next version, such as `5.0.0-rc1`, add -`-AllowPrerelease`. A prerelease is for testing; don't use it in production. +To try a prerelease of the next version, add `-AllowPrerelease`. A +prerelease is for testing; don't use it in production. You can also install a release without the PowerShell Gallery. Download `NTFSSecurity.zip` from the diff --git a/NTFSSecurity/NTFSSecurity.psd1 b/NTFSSecurity/NTFSSecurity.psd1 index 394bfad..f32223b 100644 --- a/NTFSSecurity/NTFSSecurity.psd1 +++ b/NTFSSecurity/NTFSSecurity.psd1 @@ -11,7 +11,7 @@ Copyright = '2018' - Description = 'Windows PowerShell Module for managing file and folder security on NTFS volumes' + Description = 'PowerShell module for managing file and folder security on NTFS volumes' PowerShellVersion = '5.1' @@ -102,7 +102,7 @@ ProjectUri = 'https://github.com/raandree/NTFSSecurity' ReleaseNotes = 'https://github.com/raandree/NTFSSecurity/blob/master/CHANGELOG.md' # Remove the prerelease label for the final release, see Docs/Contributing/05-Releasing.md - Prerelease = 'rc1' + Prerelease = 'rc2' } } } \ No newline at end of file diff --git a/Tests/Repository.Tests.ps1 b/Tests/Repository.Tests.ps1 index 4f519e0..a26a526 100644 --- a/Tests/Repository.Tests.ps1 +++ b/Tests/Repository.Tests.ps1 @@ -1,6 +1,7 @@ <# Tests repository files that the build and GitHub use, without a build: every packages.config lists the AlphaFS - version that the projects reference and ship, and Dependabot keeps the actions of the CI workflow up to date. + version that the projects reference and ship, Dependabot keeps the actions of the CI workflow up to date, and the + manifest and the README describe the release. #> [Diagnostics.CodeAnalysis.SuppressMessageAttribute( 'PSUseDeclaredVarsMoreThanAssignments', '', Justification = 'Pester shares variables between blocks.' @@ -75,3 +76,29 @@ Describe 'Dependabot configuration' { $raw | Should -Match '(?m)^\s+groups:\s*\n\s+[\w-]+:\s*\n\s+patterns:\s*\n\s+-\s*["'']\*["'']\s*$' } } + +Describe 'Release metadata' { + BeforeAll { + $repositoryPath = Join-Path -Path $PSScriptRoot -ChildPath '..' + $manifest = Import-PowerShellDataFile -Path (Join-Path -Path $repositoryPath -ChildPath 'NTFSSecurity\NTFSSecurity.psd1') + $version = $manifest.ModuleVersion + if ($manifest.PrivateData.PSData.Prerelease) { + $version = '{0}-{1}' -f $version, $manifest.PrivateData.PSData.Prerelease + } + } + + # Before 5.0.0-rc2, the description named Windows PowerShell, although the module supports PowerShell 7 as well. + It 'Should describe the module without naming one PowerShell edition' { + $manifest.Description | Should -BeExactly 'PowerShell module for managing file and folder security on NTFS volumes' + } + + # The PowerShell Gallery doesn't accept a version twice, and CI published 5.0.0-rc1 on 2026-10-04. + It 'Should not reuse the published version 5.0.0-rc1' { + $version | Should -Not -Be '5.0.0-rc1' + } + + It 'Should not name a prerelease version in the README, which outlives the release' { + Get-Content -LiteralPath (Join-Path -Path $repositoryPath -ChildPath 'Docs\README.md') -Raw | + Should -Not -Match '\d+\.\d+\.\d+-[A-Za-z]' + } +} \ No newline at end of file