diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Application.cs | 13 | ||||
| -rw-r--r-- | src/slskd/Core/API/Controllers/ApplicationController.cs | 2 | ||||
| -rw-r--r-- | src/slskd/Integrations/Pushbullet/PushbulletService.cs | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index d0cbe361..856b898d 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -141,10 +141,11 @@ namespace slskd /// <returns>The operation context.</returns> public async Task CheckVersionAsync() { - if (Program.InformationalVersion.EndsWith("65534")) + if (Program.IsCanary) { // todo: use the docker hub API to find the latest canary tag Logger.Information("Skipping version check for Canary build; check for updates manually."); + return; } Logger.Information("Checking GitHub Releases for latest version"); @@ -154,17 +155,17 @@ namespace slskd var latestVersion = await GitHub.GetLatestReleaseVersion( organization: Program.AppName, repository: Program.AppName, - userAgent: $"{Program.AppName} v{Program.InformationalVersion}"); + userAgent: $"{Program.AppName} v{Program.FullVersion}"); - if (latestVersion > Version.Parse(Program.InformationalVersion)) + if (latestVersion > Version.Parse(Program.SemanticVersion)) { State.SetValue(state => state with { Version = state.Version with { Latest = latestVersion.ToString(), IsUpdateAvailable = true } }); - Logger.Information("A new version is available! {CurrentVersion} -> {LatestVersion}", Program.InformationalVersion, latestVersion); + Logger.Information("A new version is available! {CurrentVersion} -> {LatestVersion}", Program.SemanticVersion, latestVersion); } else { - State.SetValue(state => state with { Version = state.Version with { Latest = Program.InformationalVersion, IsUpdateAvailable = false } }); - Logger.Information("Version {CurrentVersion} is up to date.", Program.InformationalVersion); + State.SetValue(state => state with { Version = state.Version with { Latest = Program.SemanticVersion, IsUpdateAvailable = false } }); + Logger.Information("Version {CurrentVersion} is up to date.", Program.SemanticVersion); } } catch (Exception ex) diff --git a/src/slskd/Core/API/Controllers/ApplicationController.cs b/src/slskd/Core/API/Controllers/ApplicationController.cs index d7beed6a..501f8a9c 100644 --- a/src/slskd/Core/API/Controllers/ApplicationController.cs +++ b/src/slskd/Core/API/Controllers/ApplicationController.cs @@ -101,7 +101,7 @@ namespace slskd.Core.API [Authorize] public IActionResult GetVersion() { - return Ok(Program.InformationalVersion); + return Ok(Program.SemanticVersion); } /// <summary> diff --git a/src/slskd/Integrations/Pushbullet/PushbulletService.cs b/src/slskd/Integrations/Pushbullet/PushbulletService.cs index 1ec092eb..5328f4d6 100644 --- a/src/slskd/Integrations/Pushbullet/PushbulletService.cs +++ b/src/slskd/Integrations/Pushbullet/PushbulletService.cs @@ -140,7 +140,7 @@ namespace slskd.Integrations.Pushbullet using var http = HttpClientFactory.CreateClient(); - http.DefaultRequestHeaders.UserAgent.TryParseAdd($"{Program.AppName} v{Program.Version}"); + http.DefaultRequestHeaders.UserAgent.TryParseAdd($"{Program.AppName} v{Program.FullVersion}"); Log.LogDebug("Sending Pushbullet notification {Title} {Body}", title, body); |
