Skip to content

v2.0.0: restructure to src/ + SPSFbaSync.Common module, .psd1 config, tests & modern CI#9

Merged
luigilink merged 4 commits into
mainfrom
feature/restructure-src-modules
Jul 10, 2026
Merged

v2.0.0: restructure to src/ + SPSFbaSync.Common module, .psd1 config, tests & modern CI#9
luigilink merged 4 commits into
mainfrom
feature/restructure-src-modules

Conversation

@luigilink

Copy link
Copy Markdown
Owner

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 now src/SPSFbaSync.ps1.
  • util.psm1 split into the SPSFbaSync.Common module (Public/ + Private/ + .psm1 loader + .psd1 manifest).
  • Module ModuleVersion (2.0.0) is the single source of truth for the script version, read at runtime via Get-Module.

Config JSON → .psd1 (Closes #3)

  • Flat PowerShell data file src/Config/CONTOSO-PROD.example.psd1, loaded with Import-PowerShellDataFile.
  • -ConfigFile now validates a .psd1 path.

Tests & static analysis (Closes #4)

  • Pester suite under tests/ (43 tests) + PSScriptAnalyzerSettings.psd1 (single justified exclusion).

Workflows (Closes #5)

  • release.yml: zips the contents of src/ (no wrapper), checkout@v7, action-gh-release@v3, explicit contents:write.
  • wiki.yml: checkout@v7.
  • new pester.yml: Pester + PSScriptAnalyzer on PRs, upload-artifact@v7.

Wiki (Closes #6)

  • add _Sidebar.md + Release-Process.md; update all pages for the new layout.
  • fix copy-paste bugs: Home title ("SharePoint Cumulative Update Tool"), non-existent -UpdateSiteUserInfo param, Usage param table.

README (Closes #7)

  • point to the wiki, drop the DSC "class-based resources / WMF 5.0" boilerplate.

Bug fixes folded in

  • $fullScriptPath was undefined → the Install action registered a scheduled task with an empty -File argument. Now derived from $PSCommandPath.
  • Set-USPUserProfileProperty → renamed Set-SPSUserProfileProperty (typo).
  • hardcoded version string removed (read from manifest).
  • added log rotation (Clear-SPSLogFolder + -LogRetentionDays).
  • .github/CONTRIBUTING.md now points at this project instead of PowerShell/DscResources.

Validation

  • Invoke-Pester43 passed, 0 failed.
  • Invoke-ScriptAnalyzerclean.
  • Release ZIP verified to extract straight to SPSFbaSync.ps1 + Modules/ + Config/ (no src/ wrapper).
  • ⚠️ No multi-server SharePoint farm available; validation relies on Pester + static analysis.

Refs #2, #3, #4, #5, #6, #7

luigilink and others added 4 commits July 10, 2026 19:20
…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>
@github-actions

Copy link
Copy Markdown

Pester Test Results

43 tests   43 ✅  1s ⏱️
 9 suites   0 💤
 1 files     0 ❌

Results for commit 697e725.

@luigilink luigilink merged commit bdadc74 into main Jul 10, 2026
3 checks passed
@luigilink luigilink deleted the feature/restructure-src-modules branch July 10, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment