The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Dist::Zilla::PluginBundle::Git::VersionManager - A plugin bundle that manages your version in git

VERSION

version 0.002

SYNOPSIS

In your dist.ini:

    [@Author::You], or other config entries...

    [@Git::VersionManager]
    [Git::Push]

Or, in your plugin bundle's configure method:

    $self->add_plugin(...);
    $self->add_bundle('@Git::VersionManager' => \%options)
    $self->add_plugin('Git::Push');

DESCRIPTION

This is a Dist::Zilla plugin bundle that manages the version of your distribution, and the $VERSION of the modules within it. The current version (of the release in question) is determined from our $VERSION = ... declarations in the code (or from the V environment variable), the Changes file is updated and committed as a release commit to git, which is then tagged, and then the $VERSION in code is then incremented and then that change is committed. The default options used for the plugins are carefully curated to work together, but all can be customized or overridden (see below).

It is equivalent to the following configuration directly in a dist.ini:

    [RewriteVersion::Transitional]
    :version = 0.004

    [MetaProvides::Update]

    [CopyFilesFromRelease / copy Changes]
    filename = Changes

    [Git::Commit / release snapshot]
    :version = 2.020
    allow_dirty = Changes
    allow_dirty = ... anything else passed in 'commit_files_after_release'

    [Git::Tag]

    [BumpVersionAfterRelease::Transitional]
    :version = 0.004

    [NextRelease]
    :version = 5.033
    time_zone = UTC
    format = %-8v  %{yyyy-MM-dd HH:mm:ss'Z'}d%{ (TRIAL RELEASE)}T

    [Git::Commit / post-release commit]
    :version = 2.020
    allow_dirty = Changes
    allow_dirty_match = ^lib/.*\.pm$
    commit_msg = increment $VERSION after %v release

    [Prereqs / prereqs for @Git::VersionManager]
    -phase = develop
    -relationship = suggests
    ...all the plugins this bundle uses...

OPTIONS / OVERRIDES

commit_files_after_release

File(s), which are expected to exist in the repository directory, to be committed to git as part of the release commit. Can be used more than once. When specified, the default is appended to, rather than overwritten. Defaults to Changes.

Note that you are responsible for ensuring these files are in the repository (perhaps by using [CopyFilesFromRelease]. Additionally, the file(s) will not be committed if they do not already have git history; for new files, you should add the add_files_in = . configuration (and use [Git::Check] to ensure that only these files exist in the repository, not any other files that should not be added.)

changes_version_columns

An integer that specifies how many columns (right-padded with whitespace) are allocated in Changes entries to the version string. Defaults to 10. Unused if NextRelease.format = anything is passed into the configuration.

other customizations

This bundle makes use of Dist::Zilla::Role::PluginBundle::PluginRemover and Dist::Zilla::Role::PluginBundle::Config::Slicer to allow further customization. (Note that even though some overridden values are inspected in this class, they are still overlaid on top of whatever this bundle eventually decides to pass -- so what is in the dist.ini or in the add_bundle arguments always trumps everything else.)

Plugins are not loaded until they are actually needed, so it is possible to --force-install this plugin bundle and -remove some plugins that do not install or are otherwise problematic (although release functionality will likely be broken, you should still be able to build the distribution, more or less).

SUPPORT

Bugs may be submitted through the RT bug tracker (or bug-Dist-Zilla-PluginBundle-Git-VersionManager@rt.cpan.org).

There is also a mailing list available for users of this distribution, at http://dzil.org/#mailing-list.

There is also an irc channel available for users of this distribution, at #distzilla on irc.perl.org.

I am also usually active on irc, as 'ether' at irc.perl.org.

AUTHOR

Karen Etheridge <ether@cpan.org>

COPYRIGHT AND LICENCE

This software is copyright (c) 2017 by Karen Etheridge.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.