From a184876b0a500a655673f67e80a4bcc612ccffc6 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Tue, 14 Jun 2016 13:33:19 -0700 Subject: [PATCH] Pin .NET CLI to LKG version 1.0.0-preview2-003067 Also teach `Start-PSBootstrap` the parameters `Channel` and `Version` to pass to .NET CLI's obtain scripts. --- build.psm1 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/build.psm1 b/build.psm1 index 3ccd7ecc2..518d65709 100644 --- a/build.psm1 +++ b/build.psm1 @@ -367,7 +367,11 @@ function Start-PSxUnit { function Start-PSBootstrap { - [CmdletBinding()]param() + [CmdletBinding()]param( + [ValidateSet("dev", "beta", "preview")] + [string]$Channel = "preview", + [string]$Version = "1.0.0-preview2-003067" + ) Write-Host "Installing Open PowerShell build dependencies" @@ -420,7 +424,7 @@ function Start-PSBootstrap { $installScript = "dotnet-install.sh" curl -s $obtainUrl/$installScript -o $installScript chmod +x $installScript - bash ./$installScript -c preview + bash ./$installScript -c $Channel -v $Version } # Install for Windows @@ -428,7 +432,7 @@ function Start-PSBootstrap { Remove-Item -ErrorAction SilentlyContinue -Recurse -Force ~\AppData\Local\Microsoft\dotnet $installScript = "dotnet-install.ps1" Invoke-WebRequest -Uri $obtainUrl/$installScript -OutFile $installScript - & ./$installScript + & ./$installScript -c $Channel -v $Version } elseif ($IsWindows) { Write-Warning "Start-PSBootstrap cannot be run in Core PowerShell on Windows (need Invoke-WebRequest!)" }