Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/use-local-dotnet-version' into core-port

Oren Novotny 9 gadi atpakaļ
vecāks
revīzija
7886c64295
2 mainītis faili ar 25 papildinājumiem un 1 dzēšanām
  1. 5 1
      .gitignore
  2. 20 0
      build.ps1

+ 5 - 1
.gitignore

@@ -173,4 +173,8 @@ Rx.NET/Samples/Portable/packages/
 
 *.nupkg
 *.nuget.props
-*.nuget.targets
+*.nuget.targets
+nuget.exe
+
+# dotnet local cache
+.dotnet

+ 20 - 0
build.ps1

@@ -1,4 +1,24 @@
+$repositoryRoot = split-path $MyInvocation.MyCommand.Definition
+$toolsPath = join-path $repositoryRoot ".dotnet"
+$getDotNet = join-path $toolsPath "install.ps1"
+$nugetExePath = join-path $toolsPath "nuget.exe"
 
+write-host "Download latest install script from CLI repo"
+
+New-Item -type directory -f -path $toolsPath | Out-Null
+
+Invoke-WebRequest https://raw.githubusercontent.com/dotnet/cli/v1.0.0-rc2/scripts/obtain/install.ps1 -OutFile $getDotNet
+
+$env:DOTNET_INSTALL_DIR="$repositoryRoot\.dotnet\win7-x64"
+
+if (!(Test-Path $env:DOTNET_INSTALL_DIR)) {
+    New-Item -type directory -path $env:DOTNET_INSTALL_DIR | Out-Null
+}
+
+
+& $getDotNet -arch x64
+
+$env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH"
 
 Write-Host "Building Rx.NET" -ForegroundColor Green
 .\Rx.NET\Source\build-new