aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Application.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/slskd/Application.cs')
-rw-r--r--src/slskd/Application.cs19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs
index d0cbe361..021a6c40 100644
--- a/src/slskd/Application.cs
+++ b/src/slskd/Application.cs
@@ -141,10 +141,17 @@ namespace slskd
/// <returns>The operation context.</returns>
public async Task CheckVersionAsync()
{
- if (Program.InformationalVersion.EndsWith("65534"))
+ if (Program.IsDevelopment)
+ {
+ Logger.Information("Skipping version check for Development build");
+ return;
+ }
+
+ 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 +161,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)