mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-14 22:09:26 +00:00
[ubuntu] Refactor Common.Helpers (#8910)
* [ubuntu] Refactor Common.Helpers * Move Get-AndroidPackages function from BeforeAll * Fix ParameterBinding
This commit is contained in:
committed by
GitHub
parent
92e22bd8c6
commit
0c03739e50
@@ -39,3 +39,16 @@ function Get-AptSourceRepository {
|
||||
$sourceUrl = Get-Content "$PSScriptRoot/../helpers/apt-sources.txt" | Select-String -Pattern $PackageName | Take-OutputPart -Part (1..3)
|
||||
return $sourceUrl
|
||||
}
|
||||
|
||||
function Get-OSVersionShort {
|
||||
$(Get-OSVersionFull) | Take-OutputPart -Delimiter '.' -Part 0,1
|
||||
}
|
||||
|
||||
function Get-OSVersionFull {
|
||||
lsb_release -ds | Take-OutputPart -Part 1, 2
|
||||
}
|
||||
|
||||
function Get-KernelVersion {
|
||||
$kernelVersion = uname -r
|
||||
return $kernelVersion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user