Description
Eight publish-res-*.ps1 scripts (~100 lines each) across four projects follow the exact same structure. Only 3 values differ between them:
$resourcesFolder target directory
$buildConfiguration (Debug vs Release)
- Destination filename
All 8 scripts contain identical step sequence, identical Copy-Item patterns, and an identical commented-out Infrastructure.pdb section.
Files:
src/Servy/publish-res-debug.ps1 + publish-res-release.ps1
src/Servy.Manager/publish-res-debug.ps1 + publish-res-release.ps1
src/Servy.CLI/publish-res-debug.ps1 + publish-res-release.ps1
src/Servy.Service/publish-res-debug.ps1 + publish-res-release.ps1
Estimated redundant lines: ~800
Suggested fix
Create a single publish-res.ps1 accepting -Configuration, -TargetResourcesFolder, and -DestinationName parameters.
Description
Eight
publish-res-*.ps1scripts (~100 lines each) across four projects follow the exact same structure. Only 3 values differ between them:$resourcesFoldertarget directory$buildConfiguration(Debug vs Release)All 8 scripts contain identical step sequence, identical Copy-Item patterns, and an identical commented-out Infrastructure.pdb section.
Files:
src/Servy/publish-res-debug.ps1+publish-res-release.ps1src/Servy.Manager/publish-res-debug.ps1+publish-res-release.ps1src/Servy.CLI/publish-res-debug.ps1+publish-res-release.ps1src/Servy.Service/publish-res-debug.ps1+publish-res-release.ps1Estimated redundant lines: ~800
Suggested fix
Create a single
publish-res.ps1accepting-Configuration,-TargetResourcesFolder, and-DestinationNameparameters.