From 06ccad43442629de4a60d75d73bb898d4df11801 Mon Sep 17 00:00:00 2001 From: SteveSandersonMS Date: Thu, 15 Dec 2016 18:07:34 +0000 Subject: [PATCH] Automatically install both the 'current' and 'preview' SDKs when building in Appveyor --- appveyor.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 8ea7954..9d422ec 100755 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,20 @@ init: - git config --global core.autocrlf true +install: + # .NET Core SDK binaries + # Download .NET Core SDK and add to PATH + - ps: $urlCurrent = "https://go.microsoft.com/fwlink/?LinkID=834991" + - ps: $urlPreview = "https://dotnetcli.blob.core.windows.net/dotnet/Sdk/rel-1.0.0/dotnet-dev-win-x64.latest.zip" + - ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetsdk" + - ps: mkdir $env:DOTNET_INSTALL_DIR -Force | Out-Null + - ps: $tempFileCurrent = [System.IO.Path]::GetTempFileName() + - ps: $tempFilePreview = [System.IO.Path]::GetTempFileName() + - ps: (New-Object System.Net.WebClient).DownloadFile($urlCurrent, $tempFileCurrent) + - ps: (New-Object System.Net.WebClient).DownloadFile($urlPreview, $tempFilePreview) + - ps: Add-Type -AssemblyName System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::ExtractToDirectory($tempFileCurrent, $env:DOTNET_INSTALL_DIR) + - ps: Add-Type -AssemblyName System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::ExtractToDirectory($tempFilePreview, $env:DOTNET_INSTALL_DIR + "preview") + - ps: Move-Item "${env:DOTNET_INSTALL_DIR}preview\sdk\*" "${env:DOTNET_INSTALL_DIR}\sdk\" + - ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path" build_script: - npm install -g npm@^3.0.0 - npm --prefix templates/package-builder install