Module::Release::Git - Use Git with Module::Release
The release script automatically loads this module if it sees a .git directory. The module exports check_vcs, vcs_tag, and make_vcs_tag.
check_vcs
vcs_tag
make_vcs_tag
Module::Release::Git subclasses Module::Release, and provides its own implementations of the check_vcs() and vcs_tag() methods that are suitable for use with a Git repository.
check_vcs()
vcs_tag()
These methods are automatically exported in to the callers namespace using Exporter.
This module depends on the external git binary (so far).
Check the state of the Git repository.
Return a list of contributors since last release.
Returns true if the current branch is allowed to release.
1. Look at the config for allowed_branches. That's a comma-separated list of allowed branch names. If the current branch is exactly any of those, return true. Or, keep trying.
allowed_branches
2. Look at the config for allowed_branches_regex. If the current branch matches that Perl pattern, return true. Or, keep trying.
allowed_branches_regex
3. If the current branch is exactly master or main, return true.
master
main
4. Or, return false.
Return the tag format. It's a sprintf-like syntax, but with one format:
%v replace with the full version
If you've set in the configuration, it uses that. Otherwise it returns release-%v.
release-%v
By default, examines the name of the remote file (i.e. Foo-Bar-0.04.tar.gz) and constructs a tag string like release-0.04 from it. Override this method if you want to use a different tagging scheme, or don't even call it.
release-0.04
Return the current branch name.
Returns the config for commit_message_format, or the default '* for version %s'. This is a sprintf ready string. The first argument to sprintf is the release version.
commit_message_format
'* for version %s'
sprintf
Returns the commit message, using vcs_commit_message_template as the format.
vcs_commit_message_template
Perform repo tasks post-release. This one pushes origin to master and pushes tags.
Tag the release in local Git, using the value from make_vcs_tag.
Module::Release::Subversion, Module::Release
This module is in Github:
https://github.com/briandfoy/module-release-git
brian d foy, <bdfoy@cpan.org>
Copyright © 2007-2021, brian d foy <bdfoy@cpan.org>. All rights reserved.
You may redistribute this under the same terms as the Artistic License 2.0.
To install Module::Release::Git, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Module::Release::Git
CPAN shell
perl -MCPAN -e shell install Module::Release::Git
For more information on module installation, please visit the detailed CPAN module installation guide.