v2.0.0: restructure to src/ + SPSFbaSync.Common module, .psd1 config, tests & modern CI#9
Merged
Merged
Conversation
…nc.Common Move the entry script to src/SPSFbaSync.ps1 and split the monolithic scripts/modules/util.psm1 into the SPSFbaSync.Common module (Public/Private + loader + manifest). The module ModuleVersion (2.0.0) is now the single source of truth for the script version, read at runtime via Get-Module. Migrate the configuration from JSON to a flat PowerShell data file (src/Config/CONTOSO-PROD.example.psd1) loaded with Import-PowerShellDataFile. Bug fixes folded in: - define $fullScriptPath from $PSCommandPath so the Install action registers a scheduled task with a valid -File argument (was undefined/empty). - rename Set-USPUserProfileProperty -> Set-SPSUserProfileProperty (typo + SPS* naming). - drop the hardcoded version string; read it from the manifest. - add log rotation via Clear-SPSLogFolder and a -LogRetentionDays parameter. - replace the SPSUpdate 'cumulative update' scheduled-task description with FBA wording. Refs #2, #3 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- release.yml: zip the contents of src/ (archive extracts straight to SPSFbaSync.ps1 + Modules/, no src/ wrapper), bump to actions/checkout@v7 and softprops/action-gh-release@v3, add explicit contents:write permissions. - wiki.yml: bump to actions/checkout@v7. - add pester.yml: run Pester + PSScriptAnalyzer on pull requests to main (upload-artifact@v7, checkout@v7). Closes #5 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- add _Sidebar.md navigation and a Release-Process.md page.
- Home.md: fix the SPSUpdate-inherited title ('SharePoint Cumulative Update
Tool' -> FBA sync) and replace the non-existent -UpdateSiteUserInfo/-CreateIfMissing
parameter list with the actual configuration-driven toggles.
- Usage.md: fix the parameter table (WebApplicationUrl is a config key, not a
script parameter), document -LogRetentionDays and the JSON result file.
- Configuration.md: switch the sample from JSON to the flat .psd1 format.
- Getting-Started.md: update install steps for the src/ layout and .psd1 config.
Closes #6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- README points to the wiki and drops the DSC 'class-based resources / WMF 5.0' boilerplate (and its 'rManagement' typo). - add the 2.0.0 section to CHANGELOG.md and replace RELEASE-NOTES.md with the 2.0.0 body used verbatim by the release workflow. Closes #7 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pester Test Results43 tests 43 ✅ 1s ⏱️ Results for commit 697e725. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings SPSFbaSync in line with the SPS* toolkit standard (SPSTrust, SPSUpdate, SPSCleanDependencies). This is a breaking release (v2.0.0) because it changes both the package layout and the configuration format.
Changes
Restructure & module (Closes #2)
scripts/→src/; entry script is nowsrc/SPSFbaSync.ps1.util.psm1split into the SPSFbaSync.Common module (Public/+Private/+.psm1loader +.psd1manifest).ModuleVersion(2.0.0) is the single source of truth for the script version, read at runtime viaGet-Module.Config JSON → .psd1 (Closes #3)
src/Config/CONTOSO-PROD.example.psd1, loaded withImport-PowerShellDataFile.-ConfigFilenow validates a.psd1path.Tests & static analysis (Closes #4)
tests/(43 tests) +PSScriptAnalyzerSettings.psd1(single justified exclusion).Workflows (Closes #5)
release.yml: zips the contents ofsrc/(no wrapper),checkout@v7,action-gh-release@v3, explicitcontents:write.wiki.yml:checkout@v7.pester.yml: Pester + PSScriptAnalyzer on PRs,upload-artifact@v7.Wiki (Closes #6)
_Sidebar.md+Release-Process.md; update all pages for the new layout.-UpdateSiteUserInfoparam, Usage param table.README (Closes #7)
Bug fixes folded in
$fullScriptPathwas undefined → the Install action registered a scheduled task with an empty-Fileargument. Now derived from$PSCommandPath.Set-USPUserProfileProperty→ renamedSet-SPSUserProfileProperty(typo).Clear-SPSLogFolder+-LogRetentionDays)..github/CONTRIBUTING.mdnow points at this project instead of PowerShell/DscResources.Validation
Invoke-Pester→ 43 passed, 0 failed.Invoke-ScriptAnalyzer→ clean.SPSFbaSync.ps1+Modules/+Config/(nosrc/wrapper).Refs #2, #3, #4, #5, #6, #7