public override async Task <IResponseObject> Handle() { using (var client = new HockeyAppClient()) { return(await client.UploadAsync(_hockeyAppToken, _appId, _parameters)); } }
public static HockeyAppUploadResult UpdateVersionHockeyApp(this ICakeContext context, FilePath file, FilePath symbolsFile, HockeyAppUploadSettings settings, string versionId) { settings = settings ?? new HockeyAppUploadSettings(); var uploader = new HockeyAppClient(context.Log, settings); settings.ApiToken = settings.ApiToken ?? context.Environment.GetEnvironmentVariable(TokenVariable); try { var upload = uploader.UploadFileToVersion(file, symbolsFile, settings, versionId); 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."); } }
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."); } }