diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-10-19 10:05:57 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-19 10:05:57 -0500 |
| commit | b0b346ab539df10731daf075875c6a7fbd267020 (patch) | |
| tree | 279977b03eff2a8139eaa19f06d554f8af9cf0b4 /src/slskd/Program.cs | |
| parent | a505c17116f7382bf19478bcef61837176be755b (diff) | |
| parent | 5d3ed250ec144a20d9cefd0e286ee044d50f906e (diff) | |
| download | slskd-b0b346ab539df10731daf075875c6a7fbd267020.tar.gz | |
Merge pull request #226 from slskd/canary
Fix canary version detection again. Display canary warnings in startup banner and logs
Diffstat (limited to 'src/slskd/Program.cs')
| -rw-r--r-- | src/slskd/Program.cs | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs index e94494ea..cfc95013 100644 --- a/src/slskd/Program.cs +++ b/src/slskd/Program.cs @@ -79,6 +79,11 @@ namespace slskd public static readonly string EnvironmentVariablePrefix = $"{AppName.ToUpperInvariant()}_"; /// <summary> + /// The url to the issues/support site. + /// </summary> + public static readonly string IssuesUrl = "https://github.com/slskd/slskd/issues"; + + /// <summary> /// The default XML documentation filename. /// </summary> public static readonly string XmlDocumentationFile = Path.Combine(AppContext.BaseDirectory, "etc", $"{AppName}.xml"); @@ -122,7 +127,7 @@ namespace slskd /// <summary> /// Gets a value indicating whether the current version is a Canary build. /// </summary> - public static bool IsCanary { get; } = AssemblyVersion.Build == 65534; + public static bool IsCanary { get; } = AssemblyVersion.Revision == 65534; /// <summary> /// Gets a buffer containing the last few log events. @@ -283,6 +288,14 @@ namespace slskd } logger.Information("Version: {Version}", Version); + + if (!IsCanary) + { + logger.Warning("This is a canary build"); + logger.Warning("Canary builds are considered UNSTABLE and may be completely BROKEN"); + logger.Warning($"Please report any issues here: {IssuesUrl}"); + } + logger.Information("Instance Name: {InstanceName}", OptionsAtStartup.InstanceName); logger.Information("Invocation ID: {InvocationId}", InvocationId); logger.Information("Process ID: {ProcessId}", ProcessId); @@ -522,8 +535,14 @@ namespace slskd │ GNU AFFERO GENERAL PUBLIC LICENSE │ │ https://slskd.org │ │ │ -│{centeredVersion}│ -└────────────────────────────────────────────────────────┘"; +│{centeredVersion}│"; + + if (!IsCanary) + { + banner += "\n│■■■■■■■■■■■■■■■■■■■■■■■► CANARY ◄■■■■■■■■■■■■■■■■■■■■■■■│"; + } + + banner += "\n└────────────────────────────────────────────────────────┘"; Console.WriteLine(banner); } |
