From f33a7e8282fa9c5e74f177778e9e9b0aa996e04d Mon Sep 17 00:00:00 2001 From: Nomango Date: Tue, 8 Oct 2019 14:38:17 +0800 Subject: [PATCH] update script --- scripts/appveyor/clear_project_configuration.ps1 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/appveyor/clear_project_configuration.ps1 b/scripts/appveyor/clear_project_configuration.ps1 index d8720e76..05b9fba9 100644 --- a/scripts/appveyor/clear_project_configuration.ps1 +++ b/scripts/appveyor/clear_project_configuration.ps1 @@ -3,15 +3,14 @@ function Set-FileConfiguration { [string]$filePath ) - $replace1 = "EditAndContinue" - $replace2 = "ProgramDatabase" + $replace = "(EditAndContinue|ProgramDatabase)" $replaceTo = "None" # Create a copy of .vcxproj file Copy-Item -Path $filePath -Destination ($filePath + '.template') # Overlay some configurations - Get-Content ($filePath + '.template') -Encoding UTF8 | ForEach-Object { $_ -replace $replace1, $replaceTo; $_ -replace $replace2, $replaceTo; } | Out-File $filePath -Encoding UTF8 + Get-Content ($filePath + '.template') -Encoding UTF8 | ForEach-Object { $_ -replace $replace, $replaceTo } | Out-File $filePath -Encoding UTF8 # Delete the copy file Remove-Item -Path ($filePath + '.template') @@ -22,6 +21,6 @@ Get-ChildItem -Path 'projects\' -Directory | ForEach-Object { # Search all vcxproj files Get-ChildItem -Path $dirPath *.vcxproj -File | ForEach-Object { - Set-FileConfiguration $dirPath + $_ + Set-FileConfiguration ($dirPath + '\' + $_) } }