mirror of
https://github.com/ppy/osu
synced 2025-01-11 08:39:31 +00:00
Don't consider version suffixes when checking for updates
This is just to make life easier for me with deploys for now.
This commit is contained in:
parent
e77597c2b6
commit
9ea1f5900a
@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Framework;
|
||||
@ -41,11 +42,16 @@ namespace osu.Game.Updater
|
||||
|
||||
var latest = releases.ResponseObject;
|
||||
|
||||
if (latest.TagName != version)
|
||||
// avoid any discrepancies due to build suffixes for now.
|
||||
// eventually we will want to support release streams and consider these.
|
||||
version = version.Split('-').First();
|
||||
var latestTagName = latest.TagName.Split('-').First();
|
||||
|
||||
if (latestTagName != version)
|
||||
{
|
||||
Notifications.Post(new SimpleNotification
|
||||
{
|
||||
Text = $"A newer release of osu! has been found ({version} → {latest.TagName}).\n\n"
|
||||
Text = $"A newer release of osu! has been found ({version} → {latestTagName}).\n\n"
|
||||
+ "Click here to download the new version, which can be installed over the top of your existing installation",
|
||||
Icon = FontAwesome.Solid.Upload,
|
||||
Activated = () =>
|
||||
|
Loading…
Reference in New Issue
Block a user