-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuildAll.ps1
More file actions
33 lines (29 loc) · 798 Bytes
/
BuildAll.ps1
File metadata and controls
33 lines (29 loc) · 798 Bytes
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
28
29
30
31
32
33
param
(
[switch]$BuildProjects = $false,
[switch]$CreatePackages = $false,
[string]$ProjectLog = "$($PSScriptRoot)\out.txt",
[string]$NuGetSource
)
if ($BuildProjects)
{
Remove-Item $ProjectLog
$platforms = @("x86","x64","ARM","ARM64")
ForEach ($platform in $platforms)
{
devenv SimpleKit.sln /Build "Release|$($platform)" /Out $ProjectLog
}
}
if ($CreatePackages)
{
$dirs = Get-ChildItem -Directory "$($PSScriptRoot)\src"
ForEach ($dir in $dirs)
{
if (Test-Path -Path "$($dir.FullName)\NuGetManifest.nuspec")
{
Remove-Item "$($dir.FullName)" -Recurse -Include *.nupkg
nuget pack "$($dir.FullName)\NuGetManifest.nuspec" -OutputDirectory $dir.FullName
Get-ChildItem -Path $dir.FullName -Filter *.nupkg | ForEach { nuget add $_.FullName -source $NugetSource }
}
}
}