Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,15 @@ function Install-Dotnet {
$osInfo = PSSwaggerUtility\Get-OperatingSystemInfo
$obtainUrl = "https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain"

# Install for Linux and OS X
if ($osInfo.IsLinux -or $osInfo.IsOSX) {
# Install for Linux and Mac OS
if ($osInfo.IsLinux -or $osInfo.IsMacOS) {
$LinuxInfo = Get-Content /etc/os-release -Raw | ConvertFrom-StringData
$IsUbuntu = $LinuxInfo.ID -match 'ubuntu'

# Uninstall all previous dotnet packages
$uninstallScript = if ($IsUbuntu) {
"dotnet-uninstall-debian-packages.sh"
} elseif ($osInfo.IsOSX) {
} elseif ($osInfo.IsMacOS) {
"dotnet-uninstall-pkgs.sh"
}

Expand Down Expand Up @@ -339,4 +339,4 @@ function script:Start-NativeExecution([scriptblock]$sb, [switch]$IgnoreExitcode)
}
}

Export-ModuleMember -Function Initialize-BuildDependency,Invoke-Build,Start-BuildDotNetProject
Export-ModuleMember -Function Initialize-BuildDependency,Invoke-Build,Start-BuildDotNetProject
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ function Install-Dotnet {
$obtainUrl = "https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain"

# Install for Linux and OS X
if ($osInfo.IsLinux -or $osInfo.IsOSX) {
if ($osInfo.IsLinux -or $osInfo.IsMacOS) {
$LinuxInfo = Get-Content /etc/os-release -Raw | ConvertFrom-StringData
$IsUbuntu = $LinuxInfo.ID -match 'ubuntu'

# Uninstall all previous dotnet packages
$uninstallScript = if ($IsUbuntu) {
"dotnet-uninstall-debian-packages.sh"
} elseif ($osInfo.IsOSX) {
} elseif ($osInfo.IsMacOS) {
"dotnet-uninstall-pkgs.sh"
}

Expand Down Expand Up @@ -243,4 +243,4 @@ function script:Start-NativeExecution([scriptblock]$sb, [switch]$IgnoreExitcode)
}
}

Export-ModuleMember -Function Initialize-TestDependency,Start-TestRun
Export-ModuleMember -Function Initialize-TestDependency,Start-TestRun
8 changes: 4 additions & 4 deletions PSSwagger/PSSwaggerUtility/PSSwaggerUtility.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,13 @@ function Start-PSSwaggerJobHelper

<#
.DESCRIPTION
Gets operating system information. Returns an object with the following boolean properties: IsCore, IsLinux, IsWindows, IsOSX, IsNanoServer, IsIoT
Gets operating system information. Returns an object with the following boolean properties: IsCore, IsLinux, IsWindows, IsMacOS, IsNanoServer, IsIoT
#>
function Get-OperatingSystemInfo {
$info = @{
IsCore = $false
IsLinux = $false
IsOSX = $false
IsMacOS = $false
IsWindows = $false
IsNanoServer = $false
IsIoT = $false
Expand All @@ -265,7 +265,7 @@ function Get-OperatingSystemInfo {
if ('System.Management.Automation.Platform' -as [Type]) {
$info.IsCore = [System.Management.Automation.Platform]::IsCoreCLR
$info.IsLinux = [System.Management.Automation.Platform]::IsLinux
$info.IsOSX = [System.Management.Automation.Platform]::IsOSX
$info.IsMacOS = [System.Management.Automation.Platform]::IsMacOS
$info.IsWindows = [System.Management.Automation.Platform]::IsWindows
$info.IsNanoServer = [System.Management.Automation.Platform]::IsNanoServer
$info.IsIoT = [System.Management.Automation.Platform]::IsIoT
Expand Down Expand Up @@ -1974,4 +1974,4 @@ function Get-AutoRestCredential {
} else {
Get-EmptyAuthCredentialInternal
}
}
}
6 changes: 3 additions & 3 deletions Tests/PSSwagger.Unit.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Describe "PSSwagger Unit Tests" -Tag @('BVT', 'DRT', 'UnitTest', 'P0') {
return @{
IsCore = $true
IsLinux = $true
IsOSX = $false
IsMacOS = $false
IsWindows = $false
}
}
Expand Down Expand Up @@ -120,7 +120,7 @@ Describe "PSSwagger Unit Tests" -Tag @('BVT', 'DRT', 'UnitTest', 'P0') {
return @{
IsCore = $true
IsLinux = $true
IsOSX = $false
IsMacOS = $false
IsWindows = $false
}
}
Expand Down Expand Up @@ -161,7 +161,7 @@ Describe "PSSwagger Unit Tests" -Tag @('BVT', 'DRT', 'UnitTest', 'P0') {
return @{
IsCore = $true
IsLinux = $false
IsOSX = $false
IsMacOS = $false
IsWindows = $true
}
}
Expand Down