Exemplo n.º 1
0
        public static HockeyAppUploadResult UploadToHockeyApp(this ICakeContext context, FilePath file, FilePath symbolsFile, HockeyAppUploadSettings settings)
        {
            settings = settings ?? new HockeyAppUploadSettings();

            var uploader = new HockeyAppClient(context.Log, settings);

            settings.ApiToken = settings.ApiToken ??
                                context.Environment.GetEnvironmentVariable(TokenVariable);

            try
            {
                var upload = uploader.UploadFile(file, symbolsFile, settings);
                upload.Wait();

                return(upload.Result);
            }
            catch (Exception e)
            {
                do
                {
                    context.Log.Error(e.Message);
                } while ((e = e.InnerException) != null);

                throw new Exception("Upload to Hockey App failed.");
            }
        }
Exemplo n.º 2
0
        public static void UploadToHockeyApp(this ICakeContext context, FilePath file, HockeyAppUploadSettings settings, FilePath symbolFile = null)
        {
            var uploader = new HockeyAppClient(context.Log);

            settings.ApiToken = settings.ApiToken ??
                                context.Environment.GetEnvironmentVariable(TokenVariable);

            try
            {
                uploader.UploadFile(file, settings, symbolFile);
            }
            catch (Exception e)
            {
                do
                {
                    context.Log.Error(e.Message);
                } while ((e = e.InnerException) != null);

                throw new Exception("Upload to Hockey App failed.");
            }
        }