-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathBuild.ps1
More file actions
27 lines (23 loc) · 1.35 KB
/
Build.ps1
File metadata and controls
27 lines (23 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Remove-Item -Recurse -Force .\x64\Release\** -ErrorAction SilentlyContinue
Remove-Item -Recurse -Force .\x86\Release\** -ErrorAction SilentlyContinue
Remove-Item -Recurse -Force .\TqkLibrary.WindowCapture\bin\Release\** -ErrorAction SilentlyContinue
$env:PATH="$($env:PATH);C:\Program Files\Microsoft Visual Studio\18\Community\Common7\IDE;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE"
devenv .\TqkLibrary.WindowCapture.sln /Rebuild 'Release|x64' /Project TqkLibrary.WindowCapture.Native
devenv .\TqkLibrary.WindowCapture.sln /Rebuild 'Release|x86' /Project TqkLibrary.WindowCapture.Native
dotnet build --no-incremental .\TqkLibrary.WindowCapture\TqkLibrary.WindowCapture.csproj -c Release
nuget pack .\TqkLibrary.WindowCapture\TqkLibrary.WindowCapture.nuspec -Symbols -OutputDirectory .\TqkLibrary.WindowCapture\bin\Release
$localNuget = $env:localNuget
if(![string]::IsNullOrWhiteSpace($localNuget))
{
Copy-Item .\TqkLibrary.WindowCapture\bin\Release\*.nupkg -Destination $localNuget -Force
}
$nugetKey = $env:nugetKey
if(![string]::IsNullOrWhiteSpace($nugetKey))
{
Write-Host "Enter to push nuget"
pause
Write-Host "enter to confirm"
pause
$files = [System.IO.Directory]::GetFiles(".\TqkLibrary.WindowCapture\bin\Release\")
iex "nuget push $($files[0]) -ApiKey $($nugetKey) -Source https://api.nuget.org/v3/index.json"
}