ソースを参照

Update build script

ghorsington 4 年 前
コミット
c1bf4b4e59
1 ファイル変更12 行追加2 行削除
  1. 12 2
      build.cake

+ 12 - 2
build.cake

@@ -85,7 +85,7 @@ Task("Build")
     }
 });
 
-const string DOORSTOP_VER = "2.11.1.0";
+const string DOORSTOP_VER = "2.12.0.0";
 const string DOORSTOP_DLL = "winhttp.dll";
 Task("DownloadDoorstop")
     .Does(() =>
@@ -134,6 +134,7 @@ Task("MakeDist")
         CreateDirectory(bepinDir + Directory("plugins"));
         CreateDirectory(bepinDir + Directory("patchers"));
 
+        CopyFiles("./doorstop/*.*", distArchDir);
         CopyFiles("./bin/*.*", bepinDir + Directory("core"));
         CopyFileToDirectory(doorstopArchPath, distArchDir);
         FileWriteText(distArchDir + File("changelog.txt"), changelog);
@@ -160,11 +161,20 @@ Task("Pack")
 
     if(isBleedingEdge) 
     {
+        var changelog = "";
+
+        if(!string.IsNullOrEmpty(lastBuildCommit)) {
+            changelog = TransformText("<ul><%changelog%></ul>")
+                        .WithToken("changelog", RunGit($"--no-pager log --no-merges --pretty=\"format:<li>(<code>%h</code>) [%an] %s</li>\" {lastBuildCommit}..HEAD"))
+                        .ToString();
+        }
+
         FileWriteText(distDir + File("info.json"), 
             SerializeJsonPretty(new Dictionary<string, object>{
                 ["id"] = buildId.ToString(),
                 ["date"] = DateTime.Now.ToString("o"),
-                ["changelog"] = "",
+                ["changelog"] = changelog,
+                ["hash"] = currentCommit,
                 ["artifacts"] = new Dictionary<string, object>[] {
                     new Dictionary<string, object> {
                         ["file"] = $"BepInEx_x64{commitPrefix}{buildVersion}.zip",