public static void CocoaPodInstall(this ICakeContext context, DirectoryPath projectDirectory, CocoaPodInstallSettings settings) { var r = new CocoaPodRunner(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools); r.Install(context, projectDirectory, settings); }
public void Install(ICakeContext context, DirectoryPath projectDirectory, CocoaPodInstallSettings settings) { if (settings == null) { settings = new CocoaPodInstallSettings(); } var version = GetVersion(settings); var builder = new ProcessArgumentBuilder(); builder.Append("install"); if (version < new Version(1, 0)) { if (settings.NoClean) { builder.Append("--no-clean"); } if (settings.NoIntegrate) { builder.Append("--no-integrate"); } if (settings.NoRepoUpdate) { builder.Append("--no-repo-update"); } } else { if (settings.NoClean) { Warn(context, "--no-clean is not a valid option for CocoaPods >= 1.0"); } if (settings.NoIntegrate) { Warn(context, "--no-integrate is not a valid option for CocoaPods >= 1.0" + Environment.NewLine + "Use `install! 'cocoapods', :integrate_targets => false` in your Podfile instead"); } if (settings.NoRepoUpdate) { Warn(context, "--no-repo-update is not a valid option for CocoaPods >= 1.0"); } } if (settings.Silent) { builder.Append("--silent"); } if (settings.Verbose) { builder.Append("--verbose"); } if (settings.NoAnsi) { builder.Append("--no-ansi"); } if (projectDirectory != null) { builder.Append("--project-directory=" + projectDirectory.MakeAbsolute(_cakeEnvironment).FullPath.Quote()); } Run(settings, builder, settings.ToolPath); }