forked from avadev/AvaTax-REST-V2-DotNet-SDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.csharp.nuget.ps1
34 lines (21 loc) · 1.01 KB
/
package.csharp.nuget.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
Push-Location ## https://msdn.microsoft.com/en-us/powershell/reference/3.0/microsoft.powershell.management/push-location
$nugetUrl = "https://dist.nuget.org/win-x86-commandline/v3.5.0/nuget.exe";
if (-not (Test-Path .\nuget.exe)) {
Write-Host "Downloading Nuget.exe from $nugetUrl"
Invoke-WebRequest -Uri $nugetUrl -OutFile nuget.exe
}
Write-Host ""
Write-Host "********** Build projects in release mode"
Write-Host ""
function Build-Solution {
param ( [string]$solution)
& '.\nuget.exe' 'restore' $solution
& 'C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe' $solution '/t:Build' '/p:Configuration="Release"'
}
Build-Solution -solution 'Avalara.AvaTax.Net20.sln'
Build-Solution -solution 'Avalara.AvaTax.Net45.sln'
Build-Solution -solution 'Avalara.AvaTax.Portable.sln'
Write-Host ""
Write-Host "********** Packaging NUGET"
& '.\nuget.exe' 'pack' '.\src\Avalara.AvaTax.nuspec'
Pop-Location ## https://msdn.microsoft.com/en-us/powershell/reference/3.0/microsoft.powershell.management/pop-location