diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index e622232382..7c05ad9d61 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -236,7 +236,7 @@ Word commit names descriptively. Only submit work through pull requests. When do At the time of this writing, the repository is configured to automate much of the deployment/release process. -When the new API or client is ready to be released, update the `Version.props` file appropriately and merge the pull request with the text `[APIDeploy]` or `[NuGetDeploy]` respectively in the commit message (or both!). The release will be published automatically. +When the new API, client, or DMAPI is ready to be released, update the `Version.props` file appropriately and merge the pull request with the text `[APIDeploy]`, `[NuGetDeploy]`, or `[DMDeploy]` respectively in the commit message (or all three!). The release will be published automatically. That step should be taken for the latest API and client before releasing the core version that uses them if applicable. diff --git a/build/Version.props b/build/Version.props index c908bf3fa5..79bcb4fb8f 100644 --- a/build/Version.props +++ b/build/Version.props @@ -6,7 +6,7 @@ 2.1.0 7.4.0 8.4.0 - 5.2.6 + 5.2.7 0.4.0 1.1.0 diff --git a/src/DMAPI/tgs.dm b/src/DMAPI/tgs.dm index aef492020a..a0a5df4290 100644 --- a/src/DMAPI/tgs.dm +++ b/src/DMAPI/tgs.dm @@ -1,6 +1,6 @@ // tgstation-server DMAPI -#define TGS_DMAPI_VERSION "5.2.6" +#define TGS_DMAPI_VERSION "5.2.7" // All functions and datums outside this document are subject to change with any version and should not be relied on. diff --git a/src/DMAPI/tgs/v3210/api.dm b/src/DMAPI/tgs/v3210/api.dm index 1b9d194e40..5b41e6a89d 100644 --- a/src/DMAPI/tgs/v3210/api.dm +++ b/src/DMAPI/tgs/v3210/api.dm @@ -39,7 +39,7 @@ var/warned_custom_commands = FALSE /datum/tgs_api/v3210/ApiVersion() - return new /datum/tgs_version("3.2.1.2") + return new /datum/tgs_version("3.2.1.3") /datum/tgs_api/v3210/proc/trim_left(text) for (var/i = 1 to length(text)) diff --git a/src/DMAPI/tgs/v3210/commands.dm b/src/DMAPI/tgs/v3210/commands.dm index 8975179cb0..4ccfc1a8a6 100644 --- a/src/DMAPI/tgs/v3210/commands.dm +++ b/src/DMAPI/tgs/v3210/commands.dm @@ -45,7 +45,7 @@ // Discord hack, fix the mention if it's only numbers (fuck you IRC trolls) var/regex/discord_id_regex = regex(@"^[0-9]+$") - if(discord_id_regex.Find(sender)) + if(findtext(sender, discord_id_regex)) sender = "<@[sender]>" user.mention = sender diff --git a/src/DMAPI/tgs/v5/api.dm b/src/DMAPI/tgs/v5/api.dm index 7c853cd7c1..466a986237 100644 --- a/src/DMAPI/tgs/v5/api.dm +++ b/src/DMAPI/tgs/v5/api.dm @@ -18,7 +18,7 @@ var/initialized = FALSE /datum/tgs_api/v5/ApiVersion() - return new /datum/tgs_version("5.2.6") + return new /datum/tgs_version(TGS_DMAPI_VERSION) /datum/tgs_api/v5/OnWorldNew(minimum_required_security_level) server_port = world.params[DMAPI5_PARAM_SERVER_PORT] diff --git a/src/Tgstation.Server.Host/Components/Interop/DMApiConstants.cs b/src/Tgstation.Server.Host/Components/Interop/DMApiConstants.cs index fc802ebccf..4ece931574 100644 --- a/src/Tgstation.Server.Host/Components/Interop/DMApiConstants.cs +++ b/src/Tgstation.Server.Host/Components/Interop/DMApiConstants.cs @@ -1,6 +1,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using System; +using System.Reflection; using Tgstation.Server.Host.Components.Interop.Converters; namespace Tgstation.Server.Host.Components.Interop @@ -33,7 +34,11 @@ namespace Tgstation.Server.Host.Components.Interop /// /// The DMAPI being used. /// - public static readonly Version Version = new Version(5, 2, 6); + public static readonly Version Version = Version.Parse( + Assembly + .GetExecutingAssembly() + .GetCustomAttribute() + .RawDMApiVersion); /// /// for use when communicating with the DMAPI. diff --git a/src/Tgstation.Server.Host/Components/Interop/DMApiVersionAtrribute.cs b/src/Tgstation.Server.Host/Components/Interop/DMApiVersionAtrribute.cs new file mode 100644 index 0000000000..be4a05a0c3 --- /dev/null +++ b/src/Tgstation.Server.Host/Components/Interop/DMApiVersionAtrribute.cs @@ -0,0 +1,25 @@ +using System; + +namespace Tgstation.Server.Host.Components.Interop +{ + /// + /// Attribute for bringing in the from MSBuild. + /// + [AttributeUsage(AttributeTargets.Assembly)] + sealed class DMApiVersionAtrribute : Attribute + { + /// + /// The string of the DMAPI version built. + /// + public string RawDMApiVersion { get; } + + /// + /// Initializes a new instance of the . + /// + /// The value of . + public DMApiVersionAtrribute(string rawDMApiVersion) + { + RawDMApiVersion = rawDMApiVersion ?? throw new ArgumentNullException(nameof(rawDMApiVersion)); + } + } +} diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index cad2b4d249..bee26f447e 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -17,14 +17,14 @@ true - + ClientApp/node_modules ClientApp/node_modules/.install-stamp Linux ..\.. - + @@ -35,12 +35,25 @@ - + + + + + <_Parameter1>$(TgsDmapiVersion) + + + + + + + + + @@ -109,7 +122,7 @@ - + PreserveNewest