mirror of
https://github.com/ShareX/ShareX.git
synced 2024-06-28 11:10:23 +12:00
Use GitHub API for dev build download
This commit is contained in:
parent
ad3b492836
commit
6e639b0e92
|
@ -455,7 +455,7 @@ private async void btnCheckDevBuild_Click(object sender, EventArgs e)
|
|||
if (MessageBox.Show(Resources.ApplicationSettingsForm_btnCheckDevBuild_Click_DevBuilds_Warning, "ShareX",
|
||||
MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
|
||||
{
|
||||
await TaskHelpers.DownloadAppVeyorBuild();
|
||||
await TaskHelpers.DownloadDevBuild();
|
||||
}
|
||||
|
||||
if (!IsDisposed)
|
||||
|
|
|
@ -1863,11 +1863,27 @@ public static void ToggleActionsToolbar()
|
|||
}
|
||||
}
|
||||
|
||||
public static async Task DownloadDevBuild()
|
||||
{
|
||||
GitHubUpdateChecker updateChecker = new GitHubUpdateChecker("ShareX", "DevBuilds")
|
||||
{
|
||||
IsBeta = true,
|
||||
IsPortable = Program.Portable
|
||||
};
|
||||
|
||||
await updateChecker.CheckUpdateAsync();
|
||||
|
||||
if (updateChecker.Status == UpdateStatus.UpdateAvailable)
|
||||
{
|
||||
updateChecker.DownloadUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task DownloadAppVeyorBuild()
|
||||
{
|
||||
AppVeyorUpdateChecker updateChecker = new AppVeyorUpdateChecker()
|
||||
{
|
||||
IsBeta = Program.Dev,
|
||||
IsBeta = true,
|
||||
IsPortable = Program.Portable,
|
||||
Branch = "develop"
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue