Skip to content

Commit

Permalink
melonloader 显示 Git 版本
Browse files Browse the repository at this point in the history
  • Loading branch information
clansty committed Jan 20, 2025
1 parent 72efdfe commit 887aa72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion AquaMai/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[assembly: AssemblyTrademark(AquaMai.BuildInfo.Company)]
[assembly: AssemblyVersion(AquaMai.BuildInfo.Version)]
[assembly: AssemblyFileVersion(AquaMai.BuildInfo.Version)]
[assembly: MelonInfo(typeof(AquaMai.AquaMai), AquaMai.BuildInfo.Name, AquaMai.BuildInfo.Version, AquaMai.BuildInfo.Author, AquaMai.BuildInfo.DownloadLink)]
[assembly: MelonInfo(typeof(AquaMai.AquaMai), AquaMai.BuildInfo.Name, AquaMai.BuildInfo.GitVersion, AquaMai.BuildInfo.Author, AquaMai.BuildInfo.DownloadLink)]
[assembly: MelonColor()]
[assembly: HarmonyDontPatchAll]

Expand Down
6 changes: 3 additions & 3 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Task("Restore")
Task("PreBuild")
.Does(() =>
{
var gitDescribe = GitDescribe(".", GitDescribeStrategy.Tags); // 获取 git describe 的输出
var gitDescribe = GitDescribe(".", GitDescribeStrategy.Tags).Substring(1); // 获取 git describe 的输出
var buildDate = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ");

var shortVers = gitDescribe.Substring(1).Split('-');
var shortVers = gitDescribe.Split('-');
string shortVer;
if (shortVers.Length > 1)
{
Expand All @@ -43,8 +43,8 @@ Task("PreBuild")
});

Task("Build")
.IsDependentOn("Restore")
.IsDependentOn("PreBuild")
.IsDependentOn("Restore")
.Does(() =>
{
// 使用 dotnet build 进行构建
Expand Down

0 comments on commit 887aa72

Please sign in to comment.