Esempio n. 1
0
        public void CanCreateNewVersion()
        {
            var client = new HockeyAppClient(new NullLog());

            client.CreateNewVersionAsync(new HockeyAppUploadSettings
            {
                AppId = "4184d30dce316de5443480ad8254985c",
                Version = "0.3.160108.1",
                ShortVersion = "0.3",
                Notify = NotifyOption.DoNotNotify,
                Private = true,
                Notes = "Uploaded via continuous integration."
            });
        }
        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.");
            }
        }