// Copyright Epic Games, Inc. All Rights Reserved. using System.Diagnostics.CodeAnalysis; namespace HordeAgent.Utility; /// /// Encodes version by replacing the version pattern below /// Platform-specific binaries built for Linux and macOS do not encode this information like Windows binaries do /// public static class VersionInfo { /// /// Version (the pattern is replaced prior to compilation) /// private const string VersionConstant = "$VERSION$"; /// /// Tool ID (the pattern is replaced prior to compilation) /// private const string ToolIdConstant = "$TOOL_ID$"; /// /// Version of this Horde Agent /// public static string Version { get => String.IsNullOrEmpty(VersionConstant) ? "unknown" : VersionConstant; } /// /// Self-reported tool ID of this agent. This ID will override and define exact variant of agent software any server-initiated upgrades will use. /// [SuppressMessage("Maintainability", "CA1508:Avoid dead conditional code", Justification = "Generated code")] public static string? ToolId { get => ToolIdConstant == "unknown" || String.IsNullOrEmpty(ToolIdConstant) ? null : ToolIdConstant; } }