blob: 0ff2aafae3ce071079fbfb21d28156f5135bf46f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
diff --git a/build.psm1 b/build.psm1
index 55110cd9c..207f32880 100644
--- a/build.psm1
+++ b/build.psm1
@@ -161,6 +161,32 @@ function Get-EnvironmentInformation
if ($environment.IsLinux) {
$environment += @{ 'OSArchitecture' = [System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture }
+ if ($SkipLinuxDistroCheck) {
+ Write-Warning "Skipping distro check entirely."
+
+ $environment += @{'IsDebian' = $false}
+ $environment += @{'IsDebian9' = $false}
+ $environment += @{'IsDebian10' = $false}
+ $environment += @{'IsDebian11' = $false}
+ $environment += @{'IsUbuntu' = $false}
+ $environment += @{'IsUbuntu16' = $false}
+ $environment += @{'IsUbuntu18' = $false}
+ $environment += @{'IsUbuntu20' = $false}
+ $environment += @{'IsCentOS' = $false}
+ $environment += @{'IsFedora' = $false}
+ $environment += @{'IsOpenSUSE' = $false}
+ $environment += @{'IsSLES' = $false}
+ $environment += @{'IsRedHat' = $false}
+ $environment += @{'IsRedHat7' = $false}
+ $environment += @{'IsOpenSUSE13' = $false}
+ $environment += @{'IsOpenSUSE42.1' = $false}
+ $environment += @{'IsDebianFamily' = $false}
+ $environment += @{'IsRedHatFamily' = $false}
+ $environment += @{'IsSUSEFamily' = $false}
+ $environment += @{'IsAlpine' = $false}
+
+ return [PSCustomObject] $environment
+ }
$LinuxInfo = Get-Content /etc/os-release -Raw | ConvertFrom-StringData
$lsb_release = Get-Command lsb_release -Type Application -ErrorAction Ignore | Select-Object -First 1
if ($lsb_release) {
|