Skip to content

Commit

Permalink
Provisionator's XcodeSelect now configures Xamarin Settings.plist
Browse files Browse the repository at this point in the history
  • Loading branch information
sandyarmstrong committed May 20, 2022
1 parent 5c8e3dd commit 31fa046
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 67 deletions.
25 changes: 0 additions & 25 deletions tools/devops/build-provisioning.csx.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,3 @@ Item ("@MONO_PACKAGE@");
Item ("@MIN_SHARPIE_URL@");
Item ("@VS_PACKAGE@");
DotNetCoreSdk ("@SYSTEM_DOTNET_VERSION@");

var appleSdkOverride = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.Personal), "Library", "Preferences", "Xamarin", "Settings.plist");
Item ("Override Apple SDK Settings")
.Condition (item => !File.Exists (appleSdkOverride) || GetSettingValue (appleSdkOverride, "AppleSdkRoot") != GetSelectedXcodePath ())
.Action (item => {
DeleteSafe (appleSdkOverride);
CreateSetting (appleSdkOverride, "AppleSdkRoot", GetSelectedXcodePath ());
Console.WriteLine ($"New VSMac iOS SDK Location: {GetSelectedXcodePath ()}");
});

void DeleteSafe (string file)
{
if (File.Exists (file))
File.Delete (file);
}

void CreateSetting (string settingFile, string key, string value)
{
Exec ("defaults", "write", settingFile, key, value);
}

string GetSettingValue (string settingFile, string keyName)
{
return Exec ("defaults", "read", settingFile, keyName).FirstOrDefault ();
}
25 changes: 0 additions & 25 deletions tools/devops/device-tests-provisioning.csx.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,3 @@ Item ("@MIN_SHARPIE_URL@");
DotNetCoreSdk ("@SYSTEM_DOTNET_VERSION@");

BrewPackages ("p7zip");

var appleSdkOverride = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.Personal), "Library", "Preferences", "Xamarin", "Settings.plist");
Item ("Override Apple SDK Settings")
.Condition (item => !File.Exists (appleSdkOverride) || GetSettingValue (appleSdkOverride, "AppleSdkRoot") != GetSelectedXcodePath ())
.Action (item => {
DeleteSafe (appleSdkOverride);
CreateSetting (appleSdkOverride, "AppleSdkRoot", GetSelectedXcodePath ());
Console.WriteLine ($"New VSMac iOS SDK Location: {GetSelectedXcodePath ()}");
});

void DeleteSafe (string file)
{
if (File.Exists (file))
File.Delete (file);
}

void CreateSetting (string settingFile, string key, string value)
{
Exec ("defaults", "write", settingFile, key, value);
}

string GetSettingValue (string settingFile, string keyName)
{
return Exec ("defaults", "read", settingFile, keyName).FirstOrDefault ();
}
8 changes: 0 additions & 8 deletions tools/devops/provision-shared.csx
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,6 @@ bool IsAtLeastVersion(string actualVer, string minVer)
return actualVerChars.Length > minVerChars.Length;
}

void CreateSetting (string settingFile, string key, string value) => Exec ("defaults", "write", settingFile, key, value);
string GetSettingValue (string settingFile, string keyName) => Exec ("defaults", "read", settingFile, keyName).FirstOrDefault ();
void DeleteSafe (string file)
{
if (File.Exists (file))
File.Delete (file);
}

void RemoveXcodeSymlinks (string xcodePath)
{
Console.WriteLine ($"Checkig if '{xcodePath}' is a symlink...");
Expand Down
9 changes: 0 additions & 9 deletions tools/devops/provision-xcode.csx.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,4 @@ RemoveXcodeSymlinks (reqXcode);
// Provision Xcode using the xip name declared in Make.config
Xcode ("@XCODE_XIP_NAME@").XcodeSelect (allowUntrusted: true);

var appleSdkOverride = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.Personal), "Library", "Preferences", "Xamarin", "Settings.plist");
Item ("Override Apple SDK Settings")
.Condition (item => !File.Exists (appleSdkOverride) || GetSettingValue (appleSdkOverride, "AppleSdkRoot") != GetSelectedXcodePath ())
.Action (item => {
DeleteSafe (appleSdkOverride);
CreateSetting (appleSdkOverride, "AppleSdkRoot", GetSelectedXcodePath ());
Console.WriteLine ($"New VSMac iOS SDK Location: {GetSelectedXcodePath ()}");
});

LogInstalledXcodes ();

5 comments on commit 31fa046

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💻 [CI Build] Tests on macOS Mac Catalina (10.15) passed 💻

All tests on macOS Mac Catalina (10.15) passed.

Pipeline on Agent
Hash: 31fa046642400b7741137a6f027b4b3eea964a1a

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 [CI Build] API Diff 📋

API diff (for current PR)

ℹ️ API Diff (from PR only) (please review changes)

API diff: vsdrops gist

Xamarin
.NET
Xamarin vs .NET
iOS vs Mac Catalyst (.NET)

API diff (vs stable)

✅ API Diff from stable

API diff: vsdrops gist

Xamarin
.NET
Xamarin vs .NET
iOS vs Mac Catalyst (.NET)

Generator diff

Generator Diff (no change)

Pipeline on Agent XAMMINI-052.Monterey'
Hash: 31fa046642400b7741137a6f027b4b3eea964a1a

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ [CI Build] Tests on macOS M1 - Mac Big Sur (11.5) failed ❌

Failed tests are:

  • xammac_tests
  • monotouch-test

Pipeline on Agent
Hash: 31fa046642400b7741137a6f027b4b3eea964a1a

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📚 [CI Build] Artifacts 📚

Packages generated

View packages

Pipeline on Agent XAMMINI-054.Monterey'
Hash: 31fa046642400b7741137a6f027b4b3eea964a1a

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ [CI Build] Tests passed on VSTS: simulator tests iOS. ✅

Tests passed on VSTS: simulator tests iOS.

🎉 All 234 tests passed 🎉

Pipeline on Agent XAMBOT-1107.Monterey'
Provisionator's XcodeSelect now configures Xamarin Settings.plist

Please sign in to comment.