-
-
Notifications
You must be signed in to change notification settings - Fork 148
Deprecate --nightly in favor of --release-type #251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -344,6 +344,7 @@ int main(string[] args) | |
| auto outputFile = "./changelog.dd"; | ||
| auto nextVersionString = "LATEST"; | ||
| bool useNightlyTemplate; | ||
| string releaseType = "stable"; | ||
|
|
||
| auto currDate = Clock.currTime(); | ||
| auto nextVersionDate = "%s %02d, %04d" | ||
|
|
@@ -359,7 +360,8 @@ int main(string[] args) | |
| "output|o", &outputFile, | ||
| "date", &nextVersionDate, | ||
| "version", &nextVersionString, | ||
| "nightly", &useNightlyTemplate, | ||
| "nightly", &useNightlyTemplate, // deprecated, use --version=nightly | ||
| "release-type", &releaseType, // e.g. beta or nightly (stable by default) | ||
| "prev-version", &previousVersion, // this can automatically be detected | ||
| "no-text", &hideTextChanges); | ||
|
|
||
|
|
@@ -384,17 +386,20 @@ Please supply a bugzilla version | |
| writeln("Skipped querying Bugzilla for changes. Please define a revision range e.g ./changed v2.072.2..upstream/stable"); | ||
| } | ||
|
|
||
| if (useNightlyTemplate) | ||
| { | ||
| stderr.writeln("--nightly is deprecated. Use --release-type=nightly instead."); | ||
| releaseType = "nightly"; | ||
| } | ||
|
|
||
| auto f = File(outputFile, "w"); | ||
| auto w = f.lockingTextWriter(); | ||
| w.put("Ddoc\n\n"); | ||
| w.formattedWrite("$(CHANGELOG_NAV_LAST %s)\n\n", previousVersion); | ||
|
|
||
| { | ||
| // 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); | ||
| import std.uni : asUpperCase; | ||
| w.formattedWrite("$(%sVERSION %s, =================================================,\n\n", text(releaseType.asUpperCase, "_"), nextVersionDate); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why append the underscore to the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why tie the name of a command-line switch to the name of a DDoc template? |
||
|
|
||
| scope(exit) w.put(")\n"); | ||
|
|
||
|
|
@@ -419,19 +424,14 @@ Please supply a bugzilla version | |
| changedRepos.each!(r => r.changes.writeTextChangesHeader(w, r.headline)); | ||
|
|
||
| if (!revRange.empty) | ||
| { | ||
| if (useNightlyTemplate) | ||
| w.put("$(BR)$(BIG $(RELATIVE_LINK2 bugfix-list, List of all upcoming bug fixes and enhancements.))\n\n"); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I doubt that anyone cared about this and this simplifies the generation.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand how this really simplifies generation, and I think saying "list of things in $VERSION" when $VERSION hasn't been released yet is a little bit worse? |
||
| else | ||
| w.put("$(BR)$(BIG $(RELATIVE_LINK2 bugfix-list, List of all bug fixes and enhancements in D $(VER).))\n\n"); | ||
| } | ||
| w.put("$(BR)$(BIG $(RELATIVE_LINK2 bugfix-list, List of all bug fixes and enhancements in D $(VER).))\n\n"); | ||
|
|
||
| w.put("$(HR)\n\n"); | ||
|
|
||
| // print the detailed descriptions | ||
| changedRepos.each!(x => x.changes.writeTextChangesBody(w, x.headline)); | ||
|
|
||
| if (revRange.length) | ||
| if (revRange.empty) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Err, did you mean to negate this? |
||
| w.put("$(BR)$(BIG $(LNAME2 bugfix-list, List of all bug fixes and enhancements in D $(VER):))\n\n"); | ||
| } | ||
| else | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not: