gaelcolas / Sampler

Module template with build pipeline and examples, including DSC elements.
MIT License
171 stars 42 forks source link

How does the changelog managment work? #470

Open Scamelion opened 7 months ago

Scamelion commented 7 months ago

Hi @gaelcolas,

I would like some clarification on how changelog management works. Typically, how would this be accomplished? Do you need a separate changelog branch? What would a developers work flow look like for keeping the changelog updated? For reference, we are using Bitbucket. I'm not sure if that's relevant.

This is our first time collaboratively developing a module and Sampler has been a tremendous help. It's provided a great foundation, saved time, and accelerated our learning.

Thank you in advance!

Regards, Scott

johlju commented 7 months ago

What would a developers work flow look like for keeping the changelog updated?

In the DSC Community that have a lot of modules that uses Sampler's pipeline. Each PR must add an entry to the change log under the unreleased section. When a PR is merged to the default branch (main in our case) the default branch is built and a preview release is automatically deployed. For the preview release the unreleased section of the change log is used as the releases notes in the module manifest (and also in the GitHub release if used) - the Unreleased section is not changed during preview release. When a full release is made by pushing a full release git tag version (e.g v1.0.0) the unreleased section is automatically moved to a new release section (using the tag version) in the changelog, and that is used as the release notes in the module manifest - then a new empty Unreleased section is created in the change log and the process can start again. After the release has been deployed a PR is automatically created that suggests updating the changelog with the new version section and the new empty Unreleased section.

One should keep in mind that after a full release is made, any pending PR's must be rebased and manually move the change log entry to the new Unreleased section because otherwise it will merge into the change log section of the release, because git diff does not understand that the section it was added to is now incorrect.

johlju commented 7 months ago

It seems this is not documented in the README so I think we should add it there. Tagging this as documenation.