mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
need to test
This commit is contained in:
@@ -8,9 +8,7 @@ function Get-XcodeRootPath {
|
||||
}
|
||||
|
||||
function Get-DefaultXcodeRootPath {
|
||||
$defaultXcodePath = "/Applications/Xcode.app"
|
||||
$defaultXcodeItem = Get-Item -Path $defaultXcodePath
|
||||
return $defaultXcodeItem.Target
|
||||
return (Get-Item -Path "/Applications/Xcode.app").Target
|
||||
}
|
||||
|
||||
function Get-XcodeToolPath {
|
||||
@@ -29,6 +27,22 @@ function Get-XcodeToolPath {
|
||||
return Join-Path $XcodeRootPath "Contents/Developer/usr/bin" $ToolName
|
||||
}
|
||||
|
||||
function Get-XcodeVersionInfo {
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
[string]$XcodeRootPath
|
||||
)
|
||||
|
||||
$xcodebuildPath = Get-XcodeToolPath -XcodeRootPath $XcodeRootPath -ToolName "xcodebuild"
|
||||
[string]$output = Invoke-Expression "$xcodebuildPath -version"
|
||||
$versionOutputParts = $output.Split(" ")
|
||||
return @{
|
||||
Version = [System.Version]::Parse($versionOutputParts[1])
|
||||
Build = $versionOutputParts[4]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Switch-Xcode {
|
||||
param (
|
||||
[Parameter(ParameterSetName = 'Version')]
|
||||
|
||||
Reference in New Issue
Block a user