Skip to content

Commit

Permalink
We can't use Cake v1.0.0 as there are breaks (#1099)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattleibow committed Feb 24, 2021
1 parent 3b99467 commit fe2166d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 17 deletions.
14 changes: 7 additions & 7 deletions .ci/build-manifest.cake
@@ -1,4 +1,4 @@
#addin nuget:?package=Cake.XCode&version=4.1.0
#addin nuget:?package=Cake.XCode&version=4.2.0
#addin nuget:?package=Cake.Yaml&version=3.1.0&loadDependencies=true
#addin nuget:?package=Cake.Json&version=4.0.0&loadDependencies=true
#addin nuget:?package=Xamarin.Nuget.Validator&version=1.1.1
Expand Down Expand Up @@ -122,7 +122,7 @@ if (FORCE_BUILD) {
foreach (var buildGroup in BUILD_GROUPS) {
// If ignore triggers for the platform this is running on, do not add the group even if the trigger is matched
if ((buildGroup.IgnoreTriggersOnLinux && IsRunningOnLinux ()) ||
(buildGroup.IgnoreTriggersOnMac && IsRunningOnMac ()) ||
(buildGroup.IgnoreTriggersOnMac && IsRunningOnMacOs ()) ||
(buildGroup.IgnoreTriggersOnWindows && IsRunningOnWindows ()))
continue;

Expand Down Expand Up @@ -202,7 +202,7 @@ if (BUILD_NAMES.Length > 0) {

// Remove the builds that cannot run on this platform
groupsToBuild = groupsToBuild
.Where (bg => (bg.BuildOnWindows && IsRunningOnWindows ()) || (bg.BuildOnMac && IsRunningOnMac ()) || (bg.BuildOnLinux && IsRunningOnLinux ()))
.Where (bg => (bg.BuildOnWindows && IsRunningOnWindows ()) || (bg.BuildOnMac && IsRunningOnMacOs ()) || (bg.BuildOnLinux && IsRunningOnLinux ()))
.ToList ();
if (groupsToBuild.Count > 0) {
Information ("Removed the items that cannot build on this platform, leaving:" + Environment.NewLine +
Expand All @@ -223,7 +223,7 @@ if (groupsToBuild.Count == 0) {
// Make a note if nothing changed...
Warning ("No changed files affected any of the paths from the manifest.yaml.");
} else {
if (IsRunningOnMac ()) {
if (IsRunningOnMacOs ()) {
// Make sure cocoapods are up to date if needed
if (podRepoUpdate != PodRepoUpdate.NotRequired) {
if (podRepoUpdate == PodRepoUpdate.Forced)
Expand Down Expand Up @@ -268,7 +268,7 @@ if (groupsToBuild.Count == 0) {
targets = BUILD_TARGETS.ToList ();
else if (IsRunningOnWindows ())
targets = buildGroup.WindowsBuildTargets.ToList ();
else if (IsRunningOnMac ())
else if (IsRunningOnMacOs ())
targets = buildGroup.MacBuildTargets.ToList ();
else if (IsRunningOnLinux ())
targets = buildGroup.LinuxBuildTargets.ToList ();
Expand Down Expand Up @@ -418,12 +418,12 @@ public class BuildGroup {
public override string ToString () => Name;
}

bool IsRunningOnMac () {
bool IsRunningOnMacOs () {
return System.Environment.OSVersion.Platform == PlatformID.MacOSX || MacPlatformDetector.IsMac.Value;
}

bool IsRunningOnLinux () {
return IsRunningOnUnix () && !IsRunningOnMac ();
return IsRunningOnUnix () && !IsRunningOnMacOs ();
}

internal static class MacPlatformDetector {
Expand Down
2 changes: 1 addition & 1 deletion .ci/build.yml
Expand Up @@ -23,7 +23,7 @@ parameters:
mono: 'Latest' # the version of mono to use
xcode: '12.3' # the version of Xcode to use
dotnet: '3.1.302' # the version of .NET Core to use
cake: '0.38.4' # the version of Cake to use
cake: '0.38.5' # the version of Cake to use
apiTools: '1.1.0-preview.1' # the version of the api-tools CLI to use
xharness: '1.0.0-prerelease.20602.1'
tools: [] # a list of any additional .NET Core tools needed
Expand Down
4 changes: 0 additions & 4 deletions azure-pipelines.yml
Expand Up @@ -40,14 +40,10 @@ jobs:
- JakeWharton.Picasso2OkHttp3Downloader
preBuildSteps:
- pwsh: |
dotnet tool uninstall --global Cake.Tool
dotnet tool install --global Cake.Tool
dotnet tool install --global boots
boots https://aka.ms/xamarin-android-commercial-d16-8-macos
condition: eq(variables['System.JobName'], 'macos')
- pwsh: |
dotnet tool uninstall --global Cake.Tool
dotnet tool install --global Cake.Tool
dotnet tool install --global boots
boots https://aka.ms/xamarin-android-commercial-d16-8-windows
condition: eq(variables['System.JobName'], 'windows')
Expand Down
2 changes: 1 addition & 1 deletion build.cake
Expand Up @@ -2,7 +2,7 @@ var VERBOSITY = Argument ("v", Argument ("verbosity", Verbosity.Normal));
var CONFIGURATION = Argument ("c", Argument ("configuration", "Release"));

var BUILD_NAMES = Argument ("names", Argument ("name", ""));
var BUILD_TARGETS = Argument ("build-targets", Argument ("targets", Argument ("target", "Default")));
var BUILD_TARGETS = Argument ("build-targets", Argument ("targets", Argument ("target", "ci")));

var FORCE_BUILD = Argument ("force", Argument ("forcebuild", Argument ("force-build", false)));
var POD_REPO_UPDATE = Argument ("repo-update", Argument ("pod-repo-update", false));
Expand Down
4 changes: 0 additions & 4 deletions manifest.yaml
Expand Up @@ -680,10 +680,6 @@
BuildScript: ./XPlat/Mono.Terminal/build.cake
TriggerPaths: [ XPlat/Mono.Terminal ]
MacBuildTargets: [ nuget, samples ]
- Name: Gigya
BuildScript: ./XPlat/Gigya/build.cake
TriggerPaths: [ XPlat/Gigya ]
MacBuildTargets: [ nuget, samples ]
- Name: Mono.Options
BuildScript: ./XPlat/Mono.Options/build.cake
TriggerPaths: [ XPlat/Mono.Options ]
Expand Down

0 comments on commit fe2166d

Please sign in to comment.