mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-25 05:50:22 +00:00
Updater fixes
This commit is contained in:
parent
93f33128d3
commit
44a88b4191
1 changed files with 4 additions and 2 deletions
|
@ -26,6 +26,8 @@ namespace Toolbox
|
|||
{
|
||||
try
|
||||
{
|
||||
VersionCheck versionCheck = new VersionCheck(true);
|
||||
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
var client = new GitHubClient(new ProductHeaderValue("ST_UpdateTool"));
|
||||
|
||||
|
@ -40,8 +42,8 @@ namespace Toolbox
|
|||
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();
|
||||
|
|
Loading…
Reference in a new issue