Skip to content

Commit 6572935

Browse files
fix: update site.webmanifest during setup
1 parent 6942743 commit 6572935

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

setup/setup.ps1

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,20 @@ try {
255255
}
256256
}
257257

258+
# Update web manifest files
259+
Write-Host "`nUpdating web manifest files..." -ForegroundColor Blue
260+
Get-ChildItem -Recurse -Include "site.webmanifest" | ForEach-Object {
261+
try {
262+
$content = Get-Content $_.FullName -ErrorAction Stop
263+
$content = $content -replace '"name":\s*"Can Be Yours!"', "`"name`": `"$appName`""
264+
$content = $content -replace '"short_name":\s*"Can Be Yours!"', "`"short_name`": `"$appName`""
265+
Set-Content $_.FullName $content -ErrorAction Stop
266+
}
267+
catch {
268+
Write-Host "Warning: Could not update $($_.FullName) - $($_.Exception.Message)" -ForegroundColor Yellow
269+
}
270+
}
271+
258272
# Update generated files (test results, logs, etc.)
259273
Write-Host "`nUpdating generated files..." -ForegroundColor Blue
260274
Get-ChildItem -Recurse -Include "*.trx","*.log","*.cache","*.deps.json","*.runtimeconfig.json","*.staticwebassets.*.json","*.resources.dll","*.pdb","*.dll","*.exe" | Where-Object { $_.PSIsContainer -eq $false -and $_.FullName -like "*CanBeYours*" } | ForEach-Object {

0 commit comments

Comments
 (0)