Skip to content
Permalink
Browse files

Add changelog and hash display to build script

  • Loading branch information
denikson committed Nov 9, 2019
1 parent 623d54b commit a6126f4c1807616654360d2f86c5e20f5cbe5b72
Showing with 11 additions and 1 deletion.
  1. +11 −1 build.cake
@@ -80,14 +80,24 @@ Task("Pack")

Information("Packing");
ZipCompress(pluginDir, distDir + File($"GraphicsSettings{commitPrefix}{buildVersion}.zip"));


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"] = $"GraphicsSettings{commitPrefix}{buildVersion}.zip",

0 comments on commit a6126f4

Please sign in to comment.
You can’t perform that action at this time.