mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-04-07 07:49:53 +00:00
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:
18
externals/get-os-platform.ps1
vendored
Normal file
18
externals/get-os-platform.ps1
vendored
Normal 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"
|
Reference in New Issue
Block a user