Skip to content

Bring changelog/manager from release-tools project

Jason Plum requested to merge 337-import-changelog-logic-from-release-tools into master

Summary

Bring in a modified flavor of Changelog::Manager from release-tools as scripts/changelog_manager.rb. Add this to CI as changelog stage, which only happens on master branch.

Details

The major variations from the original are:

  • Run as a script, in place of a Rake task. Simpler to put into place, keeping it small.
  • Versions are now dates, in %Y-%m-%d format
  • Operates only on the master branch.
  • Remove all logic related to SemVer, RC, distribution, etc.

The script is located at scripts/changelog_manager.rb and makes use of the libraries from scripts/lib/. I've modified many of these in small to large ways to the reasons mentioned above. The script takes one argument, the path to the Git repository. In our case in CI, this is ..

For an individual who wishes to test the functionality of changelog_manager, this can be done with a secondary checkout of this repository (e.g. /tmp/destroy-me).

Check out a second instance of this repository, so as not to dirty your working copy.

  • In this temporary copy
    • Checkout master
    • Ensure there are entries in changelogs/unreleased/. If there are none, please manually add one (bin/changelog will not work while on master).
  • From your working copy, run scripts/changelog_manager.rb /path/to/tmp/checkout.
  • From your temporary copy, run git show HEAD to see what changes were made by running the script.
  • You can restart this process by running git reset --hard HEAD~1 in your temporary copy.

Other changes

  • Reworked the format of CHANGELOG.md's Alpha entry to 2018-03-22 Alpha, and pointed to alpha documentation.

Closes #337 (closed)

Merge request reports