Bot version retrieved via --version will now match the version in .stats
This commit is contained in:
parent
3653d97c90
commit
da0eff4339
2 changed files with 2 additions and 7 deletions
src/EllieBot
|
@ -1,13 +1,8 @@
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
static string GetAppVersion()
|
|
||||||
{
|
|
||||||
return Assembly.GetExecutingAssembly().GetName().Version?.ToString() ?? "unknown";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.Length > 0 && args[0] == "--version")
|
if (args.Length > 0 && args[0] == "--version")
|
||||||
{
|
{
|
||||||
Console.WriteLine(GetAppVersion());
|
Console.WriteLine(StatsService.BotVersion);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ namespace EllieBot.Services;
|
||||||
public sealed class StatsService : IStatsService, IReadyExecutor, IEService
|
public sealed class StatsService : IStatsService, IReadyExecutor, IEService
|
||||||
{
|
{
|
||||||
public static string BotVersion
|
public static string BotVersion
|
||||||
=> typeof(Bot).Assembly.GetName().Version?.ToString(3) ?? "Custom";
|
=> typeof(Bot).Assembly.GetName().Version?.ToString(3) ?? "custom";
|
||||||
|
|
||||||
public string Author
|
public string Author
|
||||||
=> "toastie_t0ast";
|
=> "toastie_t0ast";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue