mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-20 10:57:45 +08:00
Merge branch 'dev' of https://github.com/MaaAssistantArknights/MaaAssistantArknights into dev
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user