-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add xcode-selector * update readme * fix checkout
- Loading branch information
1 parent
80746dd
commit ff0372a
Showing
21 changed files
with
641 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
param ( | ||
[string]$MonoVersion, | ||
[string]$XamarinIOSVersion, | ||
[string]$XamarinMacVersion, | ||
[string]$XamarinAndroidVersion | ||
) | ||
|
||
function Test-ToolVersion { | ||
param ( | ||
[string]$ToolName, | ||
[string]$ExpectedVersion | ||
) | ||
|
||
if ([string]::IsNullOrEmpty($ExpectedVersion)) { | ||
return | ||
} | ||
|
||
Write-Host "Check $ToolName Version..." | ||
|
||
$versionFilePath = "/Library/Frameworks/$ToolName.framework/Versions/Current/Version" | ||
$actualVersion = Get-Content $versionFilePath | ||
if (!$actualVersion.StartsWith($ExpectedVersion)) { | ||
Write-Error("Incorrect $ToolName version: $actualVersion") | ||
exit 1 | ||
} | ||
|
||
Write-Host "Correct $ToolName version: $ExpectedVersion" | ||
} | ||
|
||
if (![string]::IsNullOrEmpty($MonoVersion)) { | ||
Write-Host "Check Mono Version..." | ||
$actualVersion = & mono --version | ||
if (!$actualVersion[0].StartsWith("Mono JIT compiler version $MonoVersion")) { | ||
Write-Error("Incorrect Mono version: $actualVersion") | ||
exit 1 | ||
} | ||
} | ||
|
||
Test-ToolVersion -ToolName "Mono" -ExpectedVersion $MonoVersion | ||
Test-ToolVersion -ToolName "Xamarin.IOS" -ExpectedVersion $XamarinIOSVersion | ||
Test-ToolVersion -ToolName "Xamarin.Mac" -ExpectedVersion $XamarinMacVersion | ||
Test-ToolVersion -ToolName "Xamarin.Android" -ExpectedVersion $XamarinAndroidVersion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
param ( | ||
[string]$XcodeVersion | ||
) | ||
|
||
$expectedXcodePath = "/Applications/Xcode_$XcodeVersion.app" | ||
|
||
Write-Host "Check Xcode version" | ||
$actualXcodePath = & xcode-select -p | ||
if (!$actualXcodePath.StartsWith($expectedXcodePath)) { | ||
Write-Error "Incorrect Xcode: $actualXcodePath" | ||
exit 1 | ||
} | ||
|
||
if ($env:MD_APPLE_SDK_ROOT -ne $expectedXcodePath) { | ||
Write-Error "Incorrect Xcode: $($env:MD_APPLE_SDK_ROOT)" | ||
exit 1 | ||
} | ||
|
||
Write-Host "Correct Xcode: $XcodeVersion" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.