From 1b196207fe12f036cc367d7d29f0014758256202 Mon Sep 17 00:00:00 2001 From: Sebastian Wilzbach Date: Mon, 27 Feb 2017 07:49:08 +0100 Subject: [PATCH] Changed.d: emit nightly header --- changed.d | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/changed.d b/changed.d index 4cabe02..99907b4 100755 --- a/changed.d +++ b/changed.d @@ -332,6 +332,7 @@ int main(string[] args) { auto outputFile = "./changelog.dd"; auto nextVersionString = "LATEST"; + bool useNightlyTemplate; auto currDate = Clock.currTime(); auto nextVersionDate = "%s %02d, %04d" @@ -347,6 +348,7 @@ int main(string[] args) "output|o", &outputFile, "date", &nextVersionDate, "version", &nextVersionString, + "nightly", &useNightlyTemplate, "prev-version", &previousVersion, // this can automatically be detected "no-text", &hideTextChanges); @@ -377,7 +379,12 @@ Please supply a bugzilla version w.formattedWrite("$(CHANGELOG_NAV_LAST %s)\n\n", previousVersion); { - w.formattedWrite("$(VERSION %s, =================================================,\n\n", nextVersionDate); + // NITGHLY_VERSION is a special ddoc macro with e.g. different download links + if (useNightlyTemplate) + w.formattedWrite("$(NIGHTLY_VERSION %s,\n,\n,", nextVersionDate); + else + w.formattedWrite("$(VERSION %s, =================================================,\n\n", nextVersionDate); + scope(exit) w.put(")\n"); if (!hideTextChanges)