Skip to content

Commit b5458cf

Browse files
chore: fix setup
1 parent 1524842 commit b5458cf

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

setup.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,17 @@ Get-ChildItem -Recurse -Filter "appsettings.json" | ForEach-Object {
9191
# Update solution file
9292
Write-Host "Updating solution file..."
9393
Get-ChildItem -Filter "*.sln" | ForEach-Object {
94+
$oldName = $_.Name
95+
$newName = $_.Name -replace "CanBeYours", $solutionName
9496
$content = Get-Content $_.FullName
9597
$content = $content -replace "CanBeYours", $solutionName
9698
Set-Content $_.FullName $content
99+
100+
# Rename the solution file if name changed
101+
if ($oldName -ne $newName) {
102+
Write-Host "Renaming solution file from $oldName to $newName"
103+
Rename-Item -Path $_.FullName -NewName $newName -Force
104+
}
97105
}
98106

99107
# Update all project files

0 commit comments

Comments
 (0)