forked from mdabros/SharpLearning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
restore.ps1
22 lines (20 loc) · 881 Bytes
/
restore.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$slnPath = "SharpLearning.sln"
$sourceNugetExe = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
# We download into packages so it is not checked-in since this is ignored in git
$packagesPath = ".\packages\"
$targetNugetExe = $packagesPath + "nuget.exe"
# Download if it does not exist
If (!(Test-Path $targetNugetExe))
{
If (!(Test-Path $packagesPath))
{
mkdir $packagesPath
}
"Downloading nuget to: " + $targetNugetExe
Invoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe
}
# Install VSTS nuget bootstrapper https://github.com/Microsoft/vsts-nuget-bootstrapper
#iex ($targetNugetExe + " install -OutputDirectory " + $packagesPath + " Microsoft.VisualStudio.Services.NuGet.Bootstrap")
#iex ($packagesPath + "Microsoft.VisualStudio.Services.NuGet.Bootstrap.*\tools\Bootstrap.ps1")
# Restore
iex ($targetNugetExe + " restore " + $slnPath)