public static void UploadComponent (this ICakeContext context, FilePath xamComponentPackage, XamarinComponentUploadSettings 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.Upload (xamComponentPackage, settings ?? new XamarinComponentUploadSettings ());
success = true;
break;
}
catch
{
context.Warning("Component Upload failed attempt #{0} of {1}", attempts, settings.MaxAttempts);
}
}
if (!success)
{
context.Error("Failed to upload {0}", "component");
throw new Exception("Failed to upload component");
}
}