static async Task CheckVersion() { try { VersionChecker versionChecker = new VersionChecker { ReleaseFilter = VersionChecker.HasAsset("BeatSyncConsole") }; GithubVersion latest = await versionChecker.GetLatestVersionAsync("Zingabopp", "BeatSync").ConfigureAwait(false); if (!latest.IsValid) { Logger.log.Warn($"Unable to get information on the latest version."); return; } Version?current = Assembly.GetExecutingAssembly().GetName().Version; if (current != null) { int compare = latest.CompareTo(current); if (compare > 0) { Logger.log.Warn($"There is a new version of BeatSyncConsole available: ({latest}). Download the latest release from '{ReleaseUrl}'."); } else if (compare < 0) { Logger.log.Info($"Running a build of BeatSyncConsole from the future! Current released version is {latest}."); } else { Logger.log.Info($"Running the latest release of BeatSyncConsole."); } } } catch (Exception ex) { Logger.log.Warn($"Error checking for latest version: {ex.Message}."); Logger.log.Debug(ex); } }