This commit is contained in:
MistEO
2022-07-25 00:48:41 +08:00

View File

@@ -1,10 +1,15 @@
using System.IO;
using System.IO;
using Nuke.Common;
using System.Text.RegularExpressions;
namespace MaaBuilder;
public partial class Build
{
static string AddContributorLink(string text)
{
return Regex.Replace(text, @"@(\w+)", "[@$1](https://github.com/$1)");
}
Target UseMaaChangeLog => _ => _
.Triggers(SetMaaChangeLog)
.After(UseTagVersion)
@@ -14,7 +19,14 @@ public partial class Build
{
Information($"找到 {Parameters.MaaChangelogFile} 文件,读取内容作为更新日志");
var text = File.ReadAllText(Parameters.MaaChangelogFile);
ChangeLog = text;
try
{
ChangeLog = AddContributorLink(text);
}
catch
{
ChangeLog = text;
}
}
else
{