Add installer (#1)

* Add installer

* Add tests

* install-dotnet script should be in externals

* merge

* Fix tests

* Fix naming

* Clean up

* Feedback
This commit is contained in:
Danny McCormick
2019-06-21 08:21:08 -04:00
committed by GitHub
parent 9629dab57e
commit 187843cd79
9 changed files with 2698 additions and 2 deletions

18
externals/get-os-platform.ps1 vendored Normal file
View File

@ -0,0 +1,18 @@
function Get-Machine-Architecture()
{
# possible values: AMD64, IA64, x86
return $ENV:PROCESSOR_ARCHITECTURE
}
function Get-CLIArchitecture-From-Architecture([string]$Architecture)
{
switch ($Architecture.ToLower())
{
{ ($_ -eq "amd64") -or ($_ -eq "x64") } { return "x64" }
{ $_ -eq "x86" } { return "x86" }
default { throw "Architecture not supported. If you think this is a bug, please report it at https://github.com/dotnet/cli/issues" }
}
}
$CLIArchitecture = Get-CLIArchitecture-From-Architecture $(Get-Machine-Architecture)
Write-Output "Primary:win-$CLIArchitecture"