mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
[macOS] Clarify clang versions (#2147)
* add clang versions * changed default location to get-command * changed formatting Co-authored-by: Leonid Lapshin <originalnoe-nazvanie@yandex.ru>
This commit is contained in:
@@ -72,8 +72,12 @@ function Get-FortranVersion {
|
||||
}
|
||||
|
||||
function Get-ClangLLVMVersion {
|
||||
$clangLLVMVersion = Run-Command "$(brew --prefix llvm)/bin/clang --version" | Select-Object -First 1 | Take-Part -Part 2
|
||||
"Clang/LLVM $clangLLVMVersion"
|
||||
$locationsList = @("$((Get-Command clang).Source)", '$(brew --prefix llvm)/bin/clang')
|
||||
$locationsList | Foreach-Object {
|
||||
(Run-Command "${_} --version" | Out-String) -match "(?<version>\d+\.\d+\.\d+)" | Out-Null
|
||||
$version = $Matches.version
|
||||
"Clang/LLVM $version " + $(if(${_} -Match "brew") {"is available on ``${_}``"} else {"is default"})
|
||||
}
|
||||
}
|
||||
|
||||
function Get-NVMVersion {
|
||||
|
||||
Reference in New Issue
Block a user