mirror of
https://github.com/actions/runner-images.git
synced 2025-12-12 12:06:59 +00:00
[Linux] Minor documentation improvements (#6749)
This commit is contained in:
@@ -10,8 +10,7 @@ function Get-ChromeDriverVersion {
|
|||||||
|
|
||||||
function Get-FirefoxVersion {
|
function Get-FirefoxVersion {
|
||||||
$firefoxVersion = firefox --version
|
$firefoxVersion = firefox --version
|
||||||
$aptSourceRepo = Get-AptSourceRepository -PackageName "mozillateam"
|
return "$firefoxVersion"
|
||||||
return "$firefoxVersion (apt source repository: $aptSourceRepo)"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-GeckodriverVersion {
|
function Get-GeckodriverVersion {
|
||||||
@@ -26,8 +25,7 @@ function Get-ChromiumVersion {
|
|||||||
|
|
||||||
function Get-EdgeVersion {
|
function Get-EdgeVersion {
|
||||||
$edgeVersion = (microsoft-edge --version).trim()
|
$edgeVersion = (microsoft-edge --version).trim()
|
||||||
$aptSourceRepo = Get-AptSourceRepository -PackageName "microsoft-edge"
|
return "$edgeVersion"
|
||||||
return "$edgeVersion (apt source repository: $aptSourceRepo)"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-EdgeDriverVersion {
|
function Get-EdgeDriverVersion {
|
||||||
|
|||||||
@@ -28,19 +28,6 @@ function Get-ToolcacheGoVersions {
|
|||||||
return Get-ChildItem $toolcachePath -Name | Sort-Object { [Version]$_ }
|
return Get-ChildItem $toolcachePath -Name | Sort-Object { [Version]$_ }
|
||||||
}
|
}
|
||||||
|
|
||||||
function Build-GoEnvironmentTable {
|
|
||||||
return Get-CachedToolInstances -Name "go" -VersionCommand "version" | ForEach-Object {
|
|
||||||
$Version = [System.Version]($_.Version -Split(" "))[0]
|
|
||||||
$Name = "GOROOT_$($Version.major)_$($Version.minor)_X64"
|
|
||||||
$Value = (Get-Item env:\$Name).Value
|
|
||||||
[PSCustomObject] @{
|
|
||||||
"Name" = $Name
|
|
||||||
"Value" = (Get-Item env:\$Name).Value
|
|
||||||
"Architecture" = $_. Architecture
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function Build-CachedToolsSection {
|
function Build-CachedToolsSection {
|
||||||
$output = ""
|
$output = ""
|
||||||
|
|
||||||
@@ -50,12 +37,12 @@ function Build-CachedToolsSection {
|
|||||||
$output += New-MDHeader "Node.js" -Level 4
|
$output += New-MDHeader "Node.js" -Level 4
|
||||||
$output += New-MDList -Lines (Get-ToolcacheNodeVersions) -Style Unordered
|
$output += New-MDList -Lines (Get-ToolcacheNodeVersions) -Style Unordered
|
||||||
|
|
||||||
$output += New-MDHeader "PyPy" -Level 4
|
|
||||||
$output += New-MDList -Lines (Get-ToolcachePyPyVersions) -Style Unordered
|
|
||||||
|
|
||||||
$output += New-MDHeader "Python" -Level 4
|
$output += New-MDHeader "Python" -Level 4
|
||||||
$output += New-MDList -Lines (Get-ToolcachePythonVersions) -Style Unordered
|
$output += New-MDList -Lines (Get-ToolcachePythonVersions) -Style Unordered
|
||||||
|
|
||||||
|
$output += New-MDHeader "PyPy" -Level 4
|
||||||
|
$output += New-MDList -Lines (Get-ToolcachePyPyVersions) -Style Unordered
|
||||||
|
|
||||||
$output += New-MDHeader "Ruby" -Level 4
|
$output += New-MDHeader "Ruby" -Level 4
|
||||||
$output += New-MDList -Lines (Get-ToolcacheRubyVersions) -Style Unordered
|
$output += New-MDList -Lines (Get-ToolcacheRubyVersions) -Style Unordered
|
||||||
|
|
||||||
|
|||||||
@@ -76,16 +76,13 @@ function Get-ErlangRebar3Version {
|
|||||||
|
|
||||||
function Get-MonoVersion {
|
function Get-MonoVersion {
|
||||||
$monoVersion = mono --version | Out-String | Take-OutputPart -Part 4
|
$monoVersion = mono --version | Out-String | Take-OutputPart -Part 4
|
||||||
$aptSourceRepo = Get-AptSourceRepository -PackageName "mono"
|
return "Mono $monoVersion"
|
||||||
return "Mono $monoVersion (apt source repository: $aptSourceRepo)"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-MsbuildVersion {
|
function Get-MsbuildVersion {
|
||||||
$msbuildVersion = msbuild -version | Select-Object -Last 1
|
$msbuildVersion = msbuild -version | Select-Object -Last 1
|
||||||
$result = Select-String -Path (Get-Command msbuild).Source -Pattern "msbuild"
|
$monoVersion = Get-MonoVersion
|
||||||
$result -match "(?<path>\/\S*\.dll)" | Out-Null
|
return "MSBuild $msbuildVersion ($monoVersion)"
|
||||||
$msbuildPath = $Matches.path
|
|
||||||
return "MSBuild $msbuildVersion (from $msbuildPath)"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-NuGetVersion {
|
function Get-NuGetVersion {
|
||||||
@@ -210,11 +207,8 @@ function Get-Pip3Version {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Get-VcpkgVersion {
|
function Get-VcpkgVersion {
|
||||||
$result = Get-CommandResult "vcpkg version"
|
|
||||||
$result.Output -match "version (?<version>\d+\.\d+\.\d+)" | Out-Null
|
|
||||||
$vcpkgVersion = $Matches.version
|
|
||||||
$commitId = git -C "/usr/local/share/vcpkg" rev-parse --short HEAD
|
$commitId = git -C "/usr/local/share/vcpkg" rev-parse --short HEAD
|
||||||
return "Vcpkg $vcpkgVersion (build from master \<$commitId>)"
|
return "Vcpkg (build from commit $commitId)"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-AntVersion {
|
function Get-AntVersion {
|
||||||
@@ -261,31 +255,14 @@ function Get-PHPUnitVersion {
|
|||||||
return $Matches.version
|
return $Matches.version
|
||||||
}
|
}
|
||||||
|
|
||||||
function Build-PHPTable {
|
|
||||||
$php = @{
|
|
||||||
"Tool" = "PHP"
|
|
||||||
"Version" = "$(Get-PHPVersions -Join '<br>')"
|
|
||||||
}
|
|
||||||
$composer = @{
|
|
||||||
"Tool" = "Composer"
|
|
||||||
"Version" = Get-ComposerVersion
|
|
||||||
}
|
|
||||||
$phpunit = @{
|
|
||||||
"Tool" = "PHPUnit"
|
|
||||||
"Version" = Get-PHPUnitVersion
|
|
||||||
}
|
|
||||||
return @($php, $composer, $phpunit) | ForEach-Object {
|
|
||||||
[PSCustomObject] @{
|
|
||||||
"Tool" = $_.Tool
|
|
||||||
"Version" = $_.Version
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function Build-PHPSection {
|
function Build-PHPSection {
|
||||||
$output = ""
|
$output = ""
|
||||||
$output += New-MDHeader "PHP" -Level 3
|
$output += New-MDHeader "PHP Tools" -Level 3
|
||||||
$output += Build-PHPTable | New-MDTable
|
$output += New-MDList -Style Unordered -Lines @(
|
||||||
|
"PHP: $((Get-PHPVersions) -join ', ')",
|
||||||
|
"Composer $(Get-ComposerVersion)",
|
||||||
|
"PHPUnit $(Get-PHPUnitVersion)"
|
||||||
|
)
|
||||||
$output += New-MDCode -Lines @(
|
$output += New-MDCode -Lines @(
|
||||||
"Both Xdebug and PCOV extensions are installed, but only Xdebug is enabled."
|
"Both Xdebug and PCOV extensions are installed, but only Xdebug is enabled."
|
||||||
)
|
)
|
||||||
@@ -327,23 +304,30 @@ function Get-AzModuleVersions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Get-PowerShellModules {
|
function Get-PowerShellModules {
|
||||||
$modules = (Get-ToolsetContent).powershellModules.name
|
[Array] $result = @()
|
||||||
|
|
||||||
$psModules = Get-Module -Name $modules -ListAvailable | Sort-Object Name | Group-Object Name
|
[Array] $azureInstalledModules = Get-ChildItem -Path "/usr/share/az_*" -Directory | ForEach-Object { $_.Name.Split("_")[1] }
|
||||||
$psModules | ForEach-Object {
|
if ($azureInstalledModules.Count -gt 0) {
|
||||||
$moduleName = $_.Name
|
$result += "Az: $($azureInstalledModules -join ', ')"
|
||||||
$moduleVersions = ($_.group.Version | Sort-Object -Unique) -join '<br>'
|
|
||||||
|
|
||||||
[PSCustomObject]@{
|
|
||||||
Module = $moduleName
|
|
||||||
Version = $moduleVersions
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Array] $azureCachedModules = Get-ChildItem /usr/share/az_*.zip -File | ForEach-Object { $_.Name.Split("_")[1] }
|
||||||
|
if ($azureCachedModules.Count -gt 0) {
|
||||||
|
$result += "Az (Cached): $($azureCachedModules -join ', ')"
|
||||||
|
}
|
||||||
|
|
||||||
|
$result += (Get-ToolsetContent).powershellModules.name | ForEach-Object {
|
||||||
|
$moduleName = $_
|
||||||
|
$moduleVersions = Get-Module -Name $moduleName -ListAvailable | Select-Object -ExpandProperty Version | Sort-Object -Unique
|
||||||
|
return "$($moduleName): $($moduleVersions -join ', ')"
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-DotNetCoreSdkVersions {
|
function Get-DotNetCoreSdkVersions {
|
||||||
$unsortedDotNetCoreSdkVersion = dotnet --list-sdks list | ForEach-Object { $_ | Take-OutputPart -Part 0 }
|
$unsortedDotNetCoreSdkVersion = dotnet --list-sdks list | ForEach-Object { $_ | Take-OutputPart -Part 0 }
|
||||||
$dotNetCoreSdkVersion = $unsortedDotNetCoreSdkVersion -join " "
|
$dotNetCoreSdkVersion = $unsortedDotNetCoreSdkVersion -join ", "
|
||||||
return $dotNetCoreSdkVersion
|
return $dotNetCoreSdkVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
function Get-PostgreSqlVersion {
|
function Get-PostgreSqlVersion {
|
||||||
$postgreSQLVersion = psql --version | Take-OutputPart -Part 2
|
$postgreSQLVersion = psql --version | Take-OutputPart -Part 2
|
||||||
$aptSourceRepo = Get-AptSourceRepository -PackageName "postgresql"
|
return "PostgreSQL $postgreSQLVersion"
|
||||||
return "PostgreSQL $postgreSQLVersion (apt source repository: $aptSourceRepo)"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-MongoDbVersion {
|
function Get-MongoDbVersion {
|
||||||
$mongoDBVersion = mongod --version | Select-Object -First 1 | Take-OutputPart -Part 2 -Delimiter "v"
|
$mongoDBVersion = mongod --version | Select-Object -First 1 | Take-OutputPart -Part 2 -Delimiter "v"
|
||||||
$aptSourceRepo = Get-AptSourceRepository -PackageName "mongodb"
|
return "MongoDB $mongoDBVersion"
|
||||||
return "MongoDB $mongoDBVersion (apt source repository: $aptSourceRepo)"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-SqliteVersion {
|
function Get-SqliteVersion {
|
||||||
@@ -38,11 +36,12 @@ function Build-PostgreSqlSection {
|
|||||||
|
|
||||||
$output += New-MDHeader "PostgreSQL" -Level 4
|
$output += New-MDHeader "PostgreSQL" -Level 4
|
||||||
$output += New-MDList -Style Unordered -Lines @(
|
$output += New-MDList -Style Unordered -Lines @(
|
||||||
(Get-PostgreSqlVersion ),
|
(Get-PostgreSqlVersion)
|
||||||
"PostgreSQL Server (user:postgres)"
|
|
||||||
)
|
)
|
||||||
$output += New-MDCode -Lines @(
|
$output += New-MDCode -Lines @(
|
||||||
"PostgreSQL service is disabled by default. Use the following command as a part of your job to start the service: 'sudo systemctl start postgresql.service'"
|
"User: postgres",
|
||||||
|
"PostgreSQL service is disabled by default.",
|
||||||
|
"Use the following command as a part of your job to start the service: 'sudo systemctl start postgresql.service'"
|
||||||
)
|
)
|
||||||
|
|
||||||
return $output
|
return $output
|
||||||
@@ -53,11 +52,13 @@ function Build-MySQLSection {
|
|||||||
|
|
||||||
$output += New-MDHeader "MySQL" -Level 4
|
$output += New-MDHeader "MySQL" -Level 4
|
||||||
$output += New-MDList -Style Unordered -Lines @(
|
$output += New-MDList -Style Unordered -Lines @(
|
||||||
(Get-MySQLVersion ),
|
(Get-MySQLVersion )
|
||||||
"MySQL Server (user:root password:root)"
|
|
||||||
)
|
)
|
||||||
$output += New-MDCode -Lines @(
|
$output += New-MDCode -Lines @(
|
||||||
"MySQL service is disabled by default. Use the following command as a part of your job to start the service: 'sudo systemctl start mysql.service'"
|
"User: root",
|
||||||
|
"Password: root",
|
||||||
|
"MySQL service is disabled by default.",
|
||||||
|
"Use the following command as a part of your job to start the service: 'sudo systemctl start mysql.service'"
|
||||||
)
|
)
|
||||||
|
|
||||||
return $output
|
return $output
|
||||||
|
|||||||
@@ -24,13 +24,11 @@ Import-Module (Join-Path $PSScriptRoot "SoftwareReport.WebServers.psm1") -Disabl
|
|||||||
Restore-UserOwner
|
Restore-UserOwner
|
||||||
|
|
||||||
$markdown = ""
|
$markdown = ""
|
||||||
|
$markdown += New-MDHeader "Ubuntu $(Get-OSVersionShort)" -Level 1
|
||||||
|
|
||||||
$OSName = Get-OSName
|
|
||||||
$markdown += New-MDHeader "$OSName" -Level 1
|
|
||||||
|
|
||||||
$kernelVersion = Get-KernelVersion
|
|
||||||
$markdown += New-MDList -Style Unordered -Lines @(
|
$markdown += New-MDList -Style Unordered -Lines @(
|
||||||
"$kernelVersion"
|
"OS Version: $(Get-OSVersionFull)"
|
||||||
|
"Kernel Version: $(Get-KernelVersion)"
|
||||||
"Image Version: $env:IMAGE_VERSION"
|
"Image Version: $env:IMAGE_VERSION"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -85,7 +83,11 @@ $packageManagementList = @(
|
|||||||
|
|
||||||
$markdown += New-MDList -Style Unordered -Lines ($packageManagementList | Sort-Object)
|
$markdown += New-MDList -Style Unordered -Lines ($packageManagementList | Sort-Object)
|
||||||
|
|
||||||
$markdown += New-MDHeader "Notes:" -Level 5
|
$markdown += New-MDHeader "Environment variables" -Level 4
|
||||||
|
$markdown += Build-PackageManagementEnvironmentTable | New-MDTable
|
||||||
|
$markdown += New-MDNewLine
|
||||||
|
|
||||||
|
$markdown += New-MDHeader "Homebrew note" -Level 4
|
||||||
$reportHomebrew = @'
|
$reportHomebrew = @'
|
||||||
```
|
```
|
||||||
Location: /home/linuxbrew
|
Location: /home/linuxbrew
|
||||||
@@ -96,10 +98,6 @@ to accomplish this.
|
|||||||
'@
|
'@
|
||||||
$markdown += New-MDParagraph -Lines $reportHomebrew
|
$markdown += New-MDParagraph -Lines $reportHomebrew
|
||||||
|
|
||||||
$markdown += New-MDHeader "Environment variables" -Level 4
|
|
||||||
$markdown += Build-PackageManagementEnvironmentTable | New-MDTable
|
|
||||||
$markdown += New-MDNewLine
|
|
||||||
|
|
||||||
$markdown += New-MDHeader "Project Management" -Level 3
|
$markdown += New-MDHeader "Project Management" -Level 3
|
||||||
$projectManagementList = @()
|
$projectManagementList = @()
|
||||||
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
|
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
|
||||||
@@ -194,7 +192,7 @@ $markdown += New-MDList -Style Unordered -Lines (@(
|
|||||||
(Get-OCCliVersion),
|
(Get-OCCliVersion),
|
||||||
(Get-ORASCliVersion),
|
(Get-ORASCliVersion),
|
||||||
(Get-VerselCliversion)
|
(Get-VerselCliversion)
|
||||||
) | Sort-Object
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
$markdown += New-MDHeader "Java" -Level 3
|
$markdown += New-MDHeader "Java" -Level 3
|
||||||
@@ -256,14 +254,12 @@ $markdown += New-MDHeader "Environment variables" -Level 4
|
|||||||
$markdown += Build-BrowserWebdriversEnvironmentTable | New-MDTable
|
$markdown += Build-BrowserWebdriversEnvironmentTable | New-MDTable
|
||||||
$markdown += New-MDNewLine
|
$markdown += New-MDNewLine
|
||||||
|
|
||||||
$markdown += New-MDHeader ".NET Core SDK" -Level 3
|
$markdown += New-MDHeader ".NET Core Tools" -Level 3
|
||||||
$markdown += New-MDList -Style Unordered -Lines @(
|
$netCoreTools = @(
|
||||||
(Get-DotNetCoreSdkVersions)
|
".NET Core SDK: $(Get-DotNetCoreSdkVersions)"
|
||||||
)
|
)
|
||||||
|
$netCoreTools += Get-DotnetTools
|
||||||
$markdown += New-MDHeader ".NET tools" -Level 3
|
$markdown += New-MDList -Style Unordered -Lines $netCoreTools
|
||||||
$tools = Get-DotnetTools
|
|
||||||
$markdown += New-MDList -Lines $tools -Style Unordered
|
|
||||||
|
|
||||||
$markdown += New-MDHeader "Databases" -Level 3
|
$markdown += New-MDHeader "Databases" -Level 3
|
||||||
$databaseLists = @(
|
$databaseLists = @(
|
||||||
@@ -285,20 +281,11 @@ $markdown += Build-MSSQLToolsSection
|
|||||||
$markdown += New-MDHeader "Cached Tools" -Level 3
|
$markdown += New-MDHeader "Cached Tools" -Level 3
|
||||||
$markdown += Build-CachedToolsSection
|
$markdown += Build-CachedToolsSection
|
||||||
|
|
||||||
$markdown += New-MDHeader "Environment variables" -Level 4
|
|
||||||
$markdown += Build-GoEnvironmentTable | New-MDTable
|
|
||||||
$markdown += New-MDNewLine
|
|
||||||
|
|
||||||
$markdown += New-MDHeader "PowerShell Tools" -Level 3
|
$markdown += New-MDHeader "PowerShell Tools" -Level 3
|
||||||
$markdown += New-MDList -Lines (Get-PowershellVersion) -Style Unordered
|
$markdown += New-MDList -Lines (Get-PowershellVersion) -Style Unordered
|
||||||
|
|
||||||
$markdown += New-MDHeader "PowerShell Modules" -Level 4
|
$markdown += New-MDHeader "PowerShell Modules" -Level 4
|
||||||
$markdown += Get-PowerShellModules | New-MDTable
|
$markdown += New-MDList -Lines $(Get-PowerShellModules) -Style Unordered
|
||||||
$markdown += New-MDNewLine
|
|
||||||
$markdown += New-MDHeader "Az PowerShell Modules" -Level 4
|
|
||||||
$markdown += New-MDList -Style Unordered -Lines @(
|
|
||||||
(Get-AzModuleVersions)
|
|
||||||
)
|
|
||||||
|
|
||||||
$markdown += Build-WebServersSection
|
$markdown += Build-WebServersSection
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ function Get-AptFastVersion {
|
|||||||
|
|
||||||
function Get-AzCopyVersion {
|
function Get-AzCopyVersion {
|
||||||
$azcopyVersion = azcopy --version | Take-OutputPart -Part 2
|
$azcopyVersion = azcopy --version | Take-OutputPart -Part 2
|
||||||
return "AzCopy $azcopyVersion (available by ``azcopy`` and ``azcopy10`` aliases)"
|
return "AzCopy $azcopyVersion - available by ``azcopy`` and ``azcopy10`` aliases"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-BazelVersion {
|
function Get-BazelVersion {
|
||||||
@@ -42,28 +42,16 @@ function Get-CodeQLBundleVersion {
|
|||||||
|
|
||||||
function Get-PodManVersion {
|
function Get-PodManVersion {
|
||||||
$podmanVersion = podman --version | Take-OutputPart -Part 2
|
$podmanVersion = podman --version | Take-OutputPart -Part 2
|
||||||
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
|
|
||||||
$aptSourceRepo = Get-AptSourceRepository -PackageName "containers"
|
|
||||||
return "Podman $podmanVersion (apt source repository: $aptSourceRepo)"
|
|
||||||
}
|
|
||||||
return "Podman $podmanVersion"
|
return "Podman $podmanVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-BuildahVersion {
|
function Get-BuildahVersion {
|
||||||
$buildahVersion = buildah --version | Take-OutputPart -Part 2
|
$buildahVersion = buildah --version | Take-OutputPart -Part 2
|
||||||
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
|
|
||||||
$aptSourceRepo = Get-AptSourceRepository -PackageName "containers"
|
|
||||||
return "Buildah $buildahVersion (apt source repository: $aptSourceRepo)"
|
|
||||||
}
|
|
||||||
return "Buildah $buildahVersion"
|
return "Buildah $buildahVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-SkopeoVersion {
|
function Get-SkopeoVersion {
|
||||||
$skopeoVersion = skopeo --version | Take-OutputPart -Part 2
|
$skopeoVersion = skopeo --version | Take-OutputPart -Part 2
|
||||||
if ((Test-IsUbuntu18) -or (Test-IsUbuntu20)) {
|
|
||||||
$aptSourceRepo = Get-AptSourceRepository -PackageName "containers"
|
|
||||||
return "Skopeo $skopeoVersion (apt source repository: $aptSourceRepo)"
|
|
||||||
}
|
|
||||||
return "Skopeo $skopeoVersion"
|
return "Skopeo $skopeoVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,15 +92,13 @@ function Get-DockerAmazonECRCredHelperVersion {
|
|||||||
|
|
||||||
function Get-GitVersion {
|
function Get-GitVersion {
|
||||||
$gitVersion = git --version | Take-OutputPart -Part -1
|
$gitVersion = git --version | Take-OutputPart -Part -1
|
||||||
$aptSourceRepo = Get-AptSourceRepository -PackageName "git-core"
|
return "Git $gitVersion"
|
||||||
return "Git $gitVersion (apt source repository: $aptSourceRepo)"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-GitLFSVersion {
|
function Get-GitLFSVersion {
|
||||||
$result = Get-CommandResult "git-lfs --version"
|
$result = Get-CommandResult "git-lfs --version"
|
||||||
$gitlfsversion = $result.Output | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "/"
|
$gitlfsversion = $result.Output | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "/"
|
||||||
$aptSourceRepo = Get-AptSourceRepository -PackageName "git-lfs"
|
return "Git LFS $gitlfsversion"
|
||||||
return "Git LFS $gitlfsversion (apt source repository: $aptSourceRepo)"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-GitFTPVersion {
|
function Get-GitFTPVersion {
|
||||||
@@ -121,8 +107,7 @@ function Get-GitFTPVersion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Get-GoogleCloudSDKVersion {
|
function Get-GoogleCloudSDKVersion {
|
||||||
$aptSourceRepo = Get-AptSourceRepository -PackageName "google-cloud-sdk"
|
return gcloud --version | Select-Object -First 1
|
||||||
return "$(gcloud --version | Select-Object -First 1) (apt source repository: $aptSourceRepo)"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-HavegedVersion {
|
function Get-HavegedVersion {
|
||||||
@@ -215,8 +200,7 @@ function Get-JqVersion {
|
|||||||
|
|
||||||
function Get-AzureCliVersion {
|
function Get-AzureCliVersion {
|
||||||
$azcliVersion = (az version | ConvertFrom-Json).'azure-cli'
|
$azcliVersion = (az version | ConvertFrom-Json).'azure-cli'
|
||||||
$aptSourceRepo = Get-AptSourceRepository -PackageName "azure-cli"
|
return "Azure CLI $azcliVersion"
|
||||||
return "Azure CLI (azure-cli) $azcliVersion (installation method: $aptSourceRepo)"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-AzureDevopsVersion {
|
function Get-AzureDevopsVersion {
|
||||||
@@ -299,7 +283,7 @@ function Get-YamllintVersion {
|
|||||||
|
|
||||||
function Get-ZstdVersion {
|
function Get-ZstdVersion {
|
||||||
$zstdVersion = zstd --version | Take-OutputPart -Part 1 -Delimiter "v" | Take-OutputPart -Part 0 -Delimiter ","
|
$zstdVersion = zstd --version | Take-OutputPart -Part 1 -Delimiter "v" | Take-OutputPart -Part 0 -Delimiter ","
|
||||||
return "zstd $zstdVersion (homebrew)"
|
return "zstd $zstdVersion (Homebrew)"
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-YqVersion {
|
function Get-YqVersion {
|
||||||
|
|||||||
@@ -29,13 +29,17 @@ function Get-CommandResult {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-OSName {
|
function Get-OSVersionShort {
|
||||||
lsb_release -ds
|
$(Get-OSVersionFull) | Take-OutputPart -Delimiter '.' -Part 0,1
|
||||||
|
}
|
||||||
|
|
||||||
|
function Get-OSVersionFull {
|
||||||
|
lsb_release -ds | Take-OutputPart -Part 1, 2
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-KernelVersion {
|
function Get-KernelVersion {
|
||||||
$kernelVersion = uname -r
|
$kernelVersion = uname -r
|
||||||
return "Linux kernel version: $kernelVersion"
|
return $kernelVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
function Test-IsUbuntu18 {
|
function Test-IsUbuntu18 {
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ function Build-OSInfoSection {
|
|||||||
$kernelVersion = $parsedSystemInfo[1].Replace($fieldsToInclude[1],"").Trim()
|
$kernelVersion = $parsedSystemInfo[1].Replace($fieldsToInclude[1],"").Trim()
|
||||||
|
|
||||||
$osInfoNode = [HeaderNode]::new("macOS $version")
|
$osInfoNode = [HeaderNode]::new("macOS $version")
|
||||||
$osInfoNode.AddToolNode("System Version:", $systemVersion)
|
$osInfoNode.AddToolNode("OS Version:", $systemVersion)
|
||||||
$osInfoNode.AddToolNode("Kernel Version:", $kernelVersion)
|
$osInfoNode.AddToolNode("Kernel Version:", $kernelVersion)
|
||||||
$osInfoNode.AddToolNode("Image Version:", $ImageName.Split('_')[1])
|
$osInfoNode.AddToolNode("Image Version:", $ImageName.Split('_')[1])
|
||||||
return $osInfoNode
|
return $osInfoNode
|
||||||
|
|||||||
@@ -131,8 +131,8 @@ $tools.AddToolNode("App Center CLI", $(Get-AppCenterCLIVersion))
|
|||||||
$tools.AddToolNode("AWS CLI", $(Get-AWSCLIVersion))
|
$tools.AddToolNode("AWS CLI", $(Get-AWSCLIVersion))
|
||||||
$tools.AddToolNode("AWS SAM CLI", $(Get-AWSSAMCLIVersion))
|
$tools.AddToolNode("AWS SAM CLI", $(Get-AWSSAMCLIVersion))
|
||||||
$tools.AddToolNode("AWS Session Manager CLI", $(Get-AWSSessionManagerCLIVersion))
|
$tools.AddToolNode("AWS Session Manager CLI", $(Get-AWSSessionManagerCLIVersion))
|
||||||
$tools.AddToolNode("Azure CLI (azure-devops)", $(Get-AzureDevopsVersion))
|
|
||||||
$tools.AddToolNode("Azure CLI", $(Get-AzureCLIVersion))
|
$tools.AddToolNode("Azure CLI", $(Get-AzureCLIVersion))
|
||||||
|
$tools.AddToolNode("Azure CLI (azure-devops)", $(Get-AzureDevopsVersion))
|
||||||
$tools.AddToolNode("Bicep CLI", $(Get-BicepVersion))
|
$tools.AddToolNode("Bicep CLI", $(Get-BicepVersion))
|
||||||
$tools.AddToolNode("Cabal", $(Get-CabalVersion))
|
$tools.AddToolNode("Cabal", $(Get-CabalVersion))
|
||||||
$tools.AddToolNode("Cmake", $(Get-CmakeVersion))
|
$tools.AddToolNode("Cmake", $(Get-CmakeVersion))
|
||||||
|
|||||||
Reference in New Issue
Block a user