aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Application.cs
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-12-06 22:21:02 -0600
committerJP Dillingham <jpdillingham@gmail.com>2021-12-06 22:21:02 -0600
commit0c2ba2651bed499a6421087345dbd84823fcbc24 (patch)
treebf5c3dd64d4935c2546299a740edcea874d52ad0 /src/slskd/Application.cs
parent63be411f989425a3ecfbba83ad7e706841fdc224 (diff)
downloadslskd-0c2ba2651bed499a6421087345dbd84823fcbc24.tar.gz
use semantic version
Diffstat (limited to 'src/slskd/Application.cs')
-rw-r--r--src/slskd/Application.cs13
1 files changed, 7 insertions, 6 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)