diff --git a/src/Tgstation.Server.Host/Program.cs b/src/Tgstation.Server.Host/Program.cs index fa83a096a9..ffe02ba262 100644 --- a/src/Tgstation.Server.Host/Program.cs +++ b/src/Tgstation.Server.Host/Program.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Tgstation.Server.Host.Core; +using Tgstation.Server.Host.Properties; using Tgstation.Server.Host.System; namespace Tgstation.Server.Host @@ -17,7 +18,7 @@ namespace Tgstation.Server.Host /// /// The expected host watchdog . /// - internal static readonly Version HostWatchdogVersion = new Version(1, 1, 0); + internal static Version HostWatchdogVersion => Version.Parse(MasterVersionsAttribute.Instance.RawHostWatchdogVersion); /// /// The to use. diff --git a/src/Tgstation.Server.Host/Properties/MasterVersionsAttribute.cs b/src/Tgstation.Server.Host/Properties/MasterVersionsAttribute.cs index 20cc04786c..b378207b14 100644 --- a/src/Tgstation.Server.Host/Properties/MasterVersionsAttribute.cs +++ b/src/Tgstation.Server.Host/Properties/MasterVersionsAttribute.cs @@ -31,20 +31,28 @@ namespace Tgstation.Server.Host.Properties /// public string RawControlPanelVersion { get; } + /// + /// The of the control panel version built. + /// + public string RawHostWatchdogVersion { get; } + /// /// Initializes a new instance of the . /// /// The value of . /// The value of . /// The value of . + /// The value of . public MasterVersionsAttribute( string rawConfigurationVersion, string rawDMApiVersion, - string rawControlPanelVersion) + string rawControlPanelVersion, + string rawHostWatchdogVersion) { RawConfigurationVersion = rawConfigurationVersion ?? throw new ArgumentNullException(nameof(rawConfigurationVersion)); RawDMApiVersion = rawDMApiVersion ?? throw new ArgumentNullException(nameof(rawDMApiVersion)); RawControlPanelVersion = rawControlPanelVersion ?? throw new ArgumentNullException(nameof(rawControlPanelVersion)); + RawHostWatchdogVersion = rawHostWatchdogVersion ?? throw new ArgumentNullException(nameof(rawHostWatchdogVersion)); } } } diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index 3951c10411..490dc30a94 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -51,6 +51,7 @@ <_Parameter1>$(TgsConfigVersion) <_Parameter2>$(TgsDmapiVersion) <_Parameter3>$(TgsControlPanelVersion) + <_Parameter4>$(TgsHostWatchdogVersion)