Xamarin component restore command settings.
Наследование: XamarinComponentCredentialSettings
        public static void SubmitComponents(this ICakeContext context, XamarinComponentSubmitSettings settings, params string[] xamFileGlobbingPatterns)
        {
            foreach (var pattern in xamFileGlobbingPatterns)
            {
                var files = context.GetFiles(pattern);
                if (files == null || !files.Any())
                {
                    continue;
                }

                foreach (var file in files)
                {
                    SubmitComponent(context, file, settings);
                }
            }
        }
Пример #2
0
        public void Submit(FilePath xamComponentFile, XamarinComponentSubmitSettings settings)
        {
            var builder = new ProcessArgumentBuilder();

            builder.Append("upload");
            builder.AppendQuoted(xamComponentFile.MakeAbsolute(_cakeEnvironment).FullPath);

            if (!string.IsNullOrEmpty(settings.Email))
            {
                builder.Append("--user={0}", settings.Email);
            }

            if (!string.IsNullOrEmpty(settings.Password))
            {
                builder.Append("--password={0}", settings.Password);
            }

            Run(settings, builder);
        }
Пример #3
0
        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");
            }
        }
Пример #4
0
        public static void SubmitComponents (this ICakeContext context, XamarinComponentSubmitSettings settings, params string[] xamFileGlobbingPatterns)
        {
            foreach (var pattern in xamFileGlobbingPatterns)
            {
                var files = context.GetFiles(pattern);
                if (files == null || !files.Any())
                    continue;

                foreach (var file in files)
                {
                    SubmitComponent(context, file, settings);
                }
            }
        }
        public static void SubmitComponent(this ICakeContext context, FilePath xamComponentPackage, XamarinComponentSubmitSettings settings = null)
        {
            var runner = new XamarinComponentRunner(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools);

            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");
            }
        }