-
Notifications
You must be signed in to change notification settings - Fork 9
/
Debug.ps1
23 lines (18 loc) · 1.13 KB
/
Debug.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$ErrorActionPreference = "Stop"
[xml]$xml = Get-Content -Path "$PSScriptRoot\Directory.Build.Props"
$version = $xml.Project.PropertyGroup.Version
foreach ($platform in "ARM64", "x64")
{
if (Test-Path -Path "$PSScriptRoot\Community.PowerToys.Run.Plugin.WebSearchShortcut\bin")
{
Remove-Item -Path "$PSScriptRoot\Community.PowerToys.Run.Plugin.WebSearchShortcut\bin\*" -Recurse
}
if (Test-Path -Path "$PSScriptRoot\WebSearchShortcut-$version-$platform.zip")
{
Remove-Item -Path "$PSScriptRoot\WebSearchShortcut-$version-$platform.zip"
}
dotnet build $PSScriptRoot\PowerToys-Run-WebSearchShortcut.sln -c Debug /p:Platform=$platform
Remove-Item -Path "$PSScriptRoot\Community.PowerToys.Run.Plugin.WebSearchShortcut\bin\*" -Recurse -Include *.xml, *.pdb, PowerToys.*, Wox.*
Rename-Item -Path "$PSScriptRoot\Community.PowerToys.Run.Plugin.WebSearchShortcut\bin\$platform\Debug" -NewName "WebSearchShortcut"
Compress-Archive -Path "$PSScriptRoot\Community.PowerToys.Run.Plugin.WebSearchShortcut\bin\$platform\WebSearchShortcut" -DestinationPath "$PSScriptRoot\WebSearchShortcut-$version-$platform.zip"
}