Overview
This is a Git port of cvs-release-notes.php, which lived in the tricks repo back in CVS land.
Installation
This is a Drush command that must be installed into one of the drush commandfile locations.
To install the drush command, use composer require drupal/grn
, which should install it at site-specific level under drush/Commands/contrib/grn, or use --global to install it globally, but in this case, you'll need to configure the drush 'include' option (see the documentation on global drush commands)
For more information about installing Drush commands, please see the Drush
documentation (https://drush.org)
Features & Usage
This script is a Drush command that generates release notes from commits
between two git reference object. This is the basic syntax for the command
usage:
drush release-notes <start> <end>
The <start>
and <end>
arguments can be tag names or commit SHA1 hashes. You can use a branch name for the <end>
argument (for example, when you have not had a tag created yet. The <end>
argument can also be a remote branch. For example when the branch is not checked out localy you may try something like this:
drush rn 6.x-1.0 origin/6.x-1.x
If you only provide the tag, the previous tag before that will be used as tag. If both tags are ommitted, the latest tag will be used as the tag.
The command `release-notes`, has the aliases: `relnotes` and `rn` and there is support for `--pipe`. The command options are:
- --baseurl
- Set the base url for all issue-links. Defaults to /node/ for Drupal.org usage. Issue number will be appended to path or replace "%s".
- --changelog
- Display the commits in the format for CHANGELOG.txt as expected by drupal.org.
- --commit-count
- If set, output will show the number of commits between the two tags
- --commit-links
- Attach a link to the commit in drupalcode.org repository viewer to the end of the commit lines.
- --git=</path/to/git>
- Path to the git binary, defaults to "git"
- --nouser
- Do not try to link to user page using the /u/alias, as used in drupal.org
- --pretty=<%s>
- Pretty format of the message, see the git-log man page (section "PRETTY FORMATS")
- --reverse
- Display the commits from old to new instead of the default Git behavior that is new to old.
The commit messages undergo some modifications before reaching the output.
- Issue numbers of the form `#12345` will be transformed into links of the form `#12345`.
- Commit message prefixes like "Issue ", "Patch ", or "- " are removed.
There is a `hook_release_notes_alter()` that can be used to further process the output.
Similar tools
There is a similar tool as part of the drupalorg-cli project. The maintainer:release-notes
command is very similar, but provides a bit more summary content for the release notes.
Credits
- Originally written for CVS by dww.
- Ported to git by [Josh The Geek](http://drupal.org/user/926382) for #1002410: Convert CVS changelog auto-generation script to Git.
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - Module categories: Developer Tools
- Ecosystem: Drush
- Created by Josh The Geek on , updated
- Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.
Releases
Support for Drush 9+
Development version: 3.x-dev updated 24 Sep 2021 at 14:18 UTC