[Ubuntu] Provide version info for binutils and coreutils packages (#2627)

* include binutils and coreutils to doc section

* fix bin to core

* replace split to Take-OutputPart
This commit is contained in:
Aleksandr Chebotov
2021-02-05 19:38:39 +03:00
committed by GitHub
parent b349624d7b
commit be109fcbc2
6 changed files with 30 additions and 0 deletions

View File

@@ -34,6 +34,12 @@ function Get-BazeliskVersion {
return "Bazelisk $bazeliskVersion"
}
function Get-BinUtilsVersion {
$result = Get-CommandResult "dpkg-query --show binutils"
$binUtilsVersion = $result.Output| Take-OutputPart -Part 1 -Delimiter "`t" | Take-OutputPart -Part 0 -Delimiter "-"
return "binutils $binUtilsVersion"
}
function Get-CodeQLBundleVersion {
$CodeQLVersionsWildcard = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "CodeQL" | Join-Path -ChildPath "*"
$CodeQLVersionPath = Get-ChildItem $CodeQLVersionsWildcard | Select-Object -First 1 -Expand FullName
@@ -42,6 +48,12 @@ function Get-CodeQLBundleVersion {
return "CodeQL Action Bundle $CodeQLVersion"
}
function Get-CoreUtilsVersion {
$result = Get-CommandResult "dpkg-query --show coreutils"
$coreUtilsVersion = $result.Output | Take-OutputPart -Part 1 -Delimiter "`t" | Take-OutputPart -Part 0 -Delimiter "-"
return "coreutils $coreUtilsVersion"
}
function Get-PodManVersion {
$podmanVersion = podman --version | Take-OutputPart -Part 2
return "Podman $podmanVersion"