forked from chroma-sdk/Colore
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_artifacts.ps1
45 lines (38 loc) · 1.05 KB
/
create_artifacts.ps1
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
34
35
36
37
38
39
40
41
42
43
44
45
[CmdletBinding()]
Param(
[Parameter(Mandatory=$True)]
[string]$Platform,
[Parameter(Mandatory=$True)]
[string]$Configuration
)
$binStub = $Configuration
$zip = "colore.zip"
If ($Platform -eq "Any CPU")
{
$zip = "colore_anycpu.zip"
}
Else
{
$binStub = "$Platform\$binStub"
If ($Platform -eq "x86")
{
$zip = "colore_x86.zip"
}
Else
{
$zip = "colore_x64.zip"
}
}
Write-Host "Zipping artifacts for $Platform - $Configuration"
7z.exe a $zip .\Corale.Colore\bin\$binStub\*.dll
7z.exe a $zip .\Corale.Colore\bin\$binStub\*.xml
7z.exe a $zip .\Corale.Colore\bin\$binStub\*.pdb
# Create NuGet package if Release and Any CPU
if ($Configuration -eq "Release" -And $Platform -eq "Any CPU")
{
Write-Host "Creating NuGet package"
nuget.exe --% pack Corale.Colore\Corale.Colore.csproj -Prop Configuration=Release -Prop Platform=AnyCPU -Version "%APPVEYOR_BUILD_VERSION%"
$name = "Colore.$Env:APPVEYOR_BUILD_VERSION"
$file = "$name.nupkg"
Push-AppveyorArtifact $file -DeploymentName "nuget_package"
}