39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using System;
|
|
using System.Threading;
|
|
using System.Reflection;
|
|
using System.Linq;
|
|
using BetterSecondBotShared.Static;
|
|
using BetterSecondBotShared.logs;
|
|
namespace BetterSecondBot
|
|
{
|
|
static class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
if (helpers.notempty(Environment.GetEnvironmentVariable("Basic_BotUserName")) == true)
|
|
{
|
|
new CliDocker();
|
|
}
|
|
else
|
|
{
|
|
new CliHardware(args);
|
|
}
|
|
LogFormater.Status("- Exiting in 5 secs -");
|
|
Thread.Sleep(5000);
|
|
}
|
|
|
|
public static class AssemblyInfo
|
|
{
|
|
/// <summary> Gets the git hash value from the assembly
|
|
/// or null if it cannot be found. </summary>
|
|
public static string GetGitHash()
|
|
{
|
|
var asm = typeof(AssemblyInfo).Assembly;
|
|
var attrs = asm.GetCustomAttributes<AssemblyMetadataAttribute>();
|
|
return attrs.FirstOrDefault(a => a.Key == "GitHash")?.Value;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|