Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

Commit

Permalink
Updater fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
KillzXGaming committed Sep 22, 2024
1 parent 93f3312 commit 44a88b4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Toolbox/UpdateProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public static void CheckLatest()
{
try
{
VersionCheck versionCheck = new VersionCheck(true);

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
var client = new GitHubClient(new ProductHeaderValue("ST_UpdateTool"));

Expand All @@ -40,8 +42,8 @@ public static void CheckLatest()
var asssemblyVersion = Assembly.GetExecutingAssembly().GetName().Version;
var version = string.Concat(asssemblyVersion.ToString().Reverse().Skip(2).Reverse());

var lastestRelease = Releases.FirstOrDefault(x => x.Name.Contains($"v{version}"));
if (lastestRelease != null)
var lastestRelease = Releases.FirstOrDefault();
if (lastestRelease != null && lastestRelease.Assets[0].UpdatedAt.ToString() == versionCheck.CompileDate)
{
Runtime.ProgramVersion = lastestRelease.TagName;
Runtime.CompileDate = lastestRelease.Assets[0].UpdatedAt.ToString();
Expand Down

0 comments on commit 44a88b4

Please sign in to comment.