Closed kkazala closed 1 year ago
CHANGELOG.json
and CHANGELOG.md
are generated together from the same data (the changefiles that rush change
drops in common/changes
). CHANGELOG.json
doesn't drive CHANGELOG.md
. This change would be a somewhat fundamental change to how changelogs are generated. We have been talking about redesigning the way changelogs and publishing work, so this is a useful point of feedback, though.
It may be possible to write a small tool that uses rush-lib
to generate CHANGELOG.md
from the data that ends up in CHANGELOG.json
. Would you be able to explore that option to support your scenario?
Hi Ian Certainly. I should be able to start next week :)
From: Ian Clanton-Thuon @.> Sent: Monday, April 25, 2022 9:24:33 PM To: microsoft/rushstack @.> Cc: Kinga @.>; Author @.> Subject: Re: [microsoft/rushstack] [rush] rush publish --regenerate-changelogs does not regenerate CHANGELOG.md (Issue #3365)
CHANGELOG.json and CHANGELOG.md are generated together from the same data (the changefiles that rush change drops in common/changes). CHANGELOG.json doesn't drive CHANGELOG.md. This change would be a somewhat fundamental change to how changelogs are generated. We have been talking about redesigning the way changelogs and publishing work, so this is a useful point of feedback, though.
It may be possible to write a small tool that uses rush-lib to generate CHANGELOG.md from the data that ends up in CHANGELOG.json. Would you be able to explore that option to support your scenario?
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/rushstack/issues/3365#issuecomment-1108951363, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFLD3H66WJZYAXSDIPDYZRLVG3WPDANCNFSM5UCMSMWQ. You are receiving this because you authored the thread.Message ID: @.***>
OK thank you
From: Kinga @.> Sent: Monday, April 25, 2022 11:49 PM To: microsoft/rushstack @.> Cc: Subscribed @.***> Subject: Re: [microsoft/rushstack] [rush] rush publish --regenerate-changelogs does not regenerate CHANGELOG.md (Issue #3365)
Hi Ian Certainly. I should be able to start next week :)
From: Ian Clanton-Thuon @.> Sent: Monday, April 25, 2022 9:24:33 PM To: microsoft/rushstack @.> Cc: Kinga @.>; Author @.> Subject: Re: [microsoft/rushstack] [rush] rush publish --regenerate-changelogs does not regenerate CHANGELOG.md (Issue #3365)
CHANGELOG.json and CHANGELOG.md are generated together from the same data (the changefiles that rush change drops in common/changes). CHANGELOG.json doesn't drive CHANGELOG.md. This change would be a somewhat fundamental change to how changelogs are generated. We have been talking about redesigning the way changelogs and publishing work, so this is a useful point of feedback, though.
It may be possible to write a small tool that uses rush-lib to generate CHANGELOG.md from the data that ends up in CHANGELOG.json. Would you be able to explore that option to support your scenario?
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/rushstack/issues/3365#issuecomment-1108951363, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFLD3H66WJZYAXSDIPDYZRLVG3WPDANCNFSM5UCMSMWQ. You are receiving this because you authored the thread.Message ID: @.***>
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/rushstack/issues/3365#issuecomment-1109464171, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AXYWCLL4BY54NXVE6L6NMOLVG6NYXANCNFSM5UCMSMWQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>
@calbearox I finally :see_no_evil: found time to look into this.
"CHANGELOG.json
doesn't drive CHANGELOG.md
."
It actually does. This is why, on top of the CHANGELOG.md
, there's a warning: "This log was last generated on ... and should not be manually modified."
If I edit CHANGELOG.json
and run rush publish --regenerate-changelogs
, any manual edits of CHANGELOG.md
are lost and the CHANGELOG.md
is generated from the scratch based on the manually updated CHANGELOG.json
.
One exception being the initial version that always, no matter what, gets "Initial release" description. I think this is what gave me impression that the command doesn't work correctly.
Do you think it might be useful to publish ChangelogGenerator.regenerateChangelogs
as a method of ChangeManager class?
I'm currently using a custom rush command that, among other things, executes utils.executeCommand(
rush --quiet publish --regenerate-changelogs);
. I think it would be nicer to use rush API, but I can also live without it =)
Closing - it looks like this feature is working as intended, i.e., you can regenerate the markdown files from the json files using the command: rush publish --regenerate-changelogs
.
(This is probably the simplest way to accomplish this via custom scripts and CI workflows, but any PRs to make it even easier are always welcome!)
Summary
rush version --bump
, correctly generates CHANGELOG.json and CHANGELOG.md files for all the changed projects defined in rush.jsonrush publish --regenerate-changelogs
, expecting the corresponsing CHANGELOG.md file to be updated accordinglyStarting "rush publish"
Checking Git policy for this repository.
Validating package manager shrinkwrap file.
Regenerating changelogs Found: C:[...]\Libraries\projectA\CHANGELOG.md Found: C:[...]\Libraries\projectB\CHANGELOG.md Found: C:[...]\Apps\projectC\CHANGELOG.md Found: C:[...]\Apps\projectD\CHANGELOG.md
Standard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/rush
globally installed version?rushVersion
from rush.json?useWorkspaces
from rush.json?node -v
)?