public static void SubmitComponent (this ICakeContext context, FilePath xamComponentPackage, XamarinComponentSubmitSettings settings = null)
{
var runner = new XamarinComponentRunner (context.FileSystem, context.Environment, context.ProcessRunner, context.Globber);
int attempts = 0;
bool success = false;
while (attempts < settings.MaxAttempts)
{
attempts++;
try
{
runner.Submit (xamComponentPackage, settings ?? new XamarinComponentSubmitSettings ());
success = true;
break;
}
catch
{
context.Warning("Component Submit failed attempt #{0} of {1}", attempts, settings.MaxAttempts);
}
}
if (!success)
{
context.Error("Failed to submit {0}", "component");
throw new Exception("Failed to submit component");
}
}