3 Distar - Additions to ExtUtils::MakeMaker for dist authors
9 use ExtUtils::MakeMaker;
10 (do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
14 `maint/Makefile.PL.include`:
16 BEGIN { -e 'Distar' or system qw(git clone https://github.com/p5sagit/Distar.git) }
20 author 'A. U. Thor <author@cpan.org>';
22 manifest_include t => 'test-helper.pl';
23 manifest_include corpus => '.txt';
28 $ make bump # bump version
29 $ make bump V=2.000000 # bump to specific version
30 $ make bumpminor # bump minor version component
31 $ make bumpmajor # bump major version component
32 $ make nextrelease # add version heading to Changes file
33 $ make releasetest # build dist and test (with xt/ and RELEASE_TESTING=1)
34 $ make preflight # check that repo and file state is release ready
35 $ make release # check releasetest and preflight, commits and tags,
36 # builds and uploads to CPAN, and pushes commits and
38 $ make release FAKE_RELEASE=1
39 # builds a release INCLUDING committing and tagging,
40 # but does not upload to cpan or push anything to git
44 [ExtUtils::MakeMaker](https://metacpan.org/pod/ExtUtils%3A%3AMakeMaker) works well enough as development tool for
45 builting and testing, but using it to release is annoying and error prone.
46 Distar adds just enough to [ExtUtils::MakeMaker](https://metacpan.org/pod/ExtUtils%3A%3AMakeMaker) for it to be a usable dist
47 author tool. This includes extra commands for releasing and safety checks, and
48 automatic generation of some files. It doesn't require any non-core modules and
49 is compatible with old versions of perl.
55 Set the author to include in generated META files. Can be a single entry, or
58 ## manifest\_include( $dir, $pattern )
60 Add a pattern to include files in the MANIFEST file, and thus in the generated
63 The pattern can be either a regex, or a path suffix. It will be applied to the
64 full path past the directory specified.
66 The default files that are always included are: `.pm` and `.pod` files in
67 `lib`, `.t` files in `t` and `xt`, `.pm` files in `t/lib` and `xt/lib`,
68 `Changes`, `MANIFEST`, `README`, `LICENSE`, `META.yml`, and `.PL` files in
69 the dist root, and all files in `maint`.
75 The `MANIFEST.SKIP` will be automatically generated to exclude any files not
76 explicitly allowed via `manifest_include` or the included defaults. It will be
77 created (or updated) at `perl Makefile.PL` time.
81 The `README` file will be generated at dist generation time, inside the built
82 dist. It will be generated using `pod2text` on the main module.
84 If a `README` file exists in the repo, it will be used directly instead of
91 test will be adjusted to include `xt/` tests by default. This will only apply
92 for authors, not users installing from CPAN.
96 Releases the dist. Before releasing, checks will be done on the dist using the
97 `preflight` and `releasetest` commands.
99 Releasing will generate a dist tarball and upload it to CPAN using cpan-upload.
100 It will also create a git tag for the release, and push the tag and branch.
104 If release is run with FAKE\_RELEASE=1 set, it will skip uploading to CPAN and
105 pushing to git. A release commit will still be created and tagged locally.
109 Performs a number of checks on the files and repository, ensuring it is in a
110 sane state to do a release. The checks are:
112 - All version numbers match
113 - The `MANIFEST` file is up to date
114 - The branch is correct
115 - There is no existing tag for the version
116 - There are no unmerged upstream changes
117 - There are no outstanding local changes
118 - There is an appropriate staged Changes heading
119 - cpan-upload is available
123 Test the dist preparing for a release. This generates a dist dir and runs the
124 tests from inside it. This ensures all appropriate files are included inside
125 the dist. `RELEASE_TESTING` will be set in the environment.
129 Adds an appropriate changelog heading for the release, and prompts to stage the
134 Bumps the version number. This will try to preserve the length and format of
135 the version number. The least significant digit will be incremented. Versions
136 with underscores will preserve the underscore in the same position.
138 Optionally accepts a `V` option to set the version to a specific value.
140 The version changes will automatically be committed. Unstaged modifications to
141 the files will be left untouched.
145 The V option will be passed along to the version bumping script. It can accept
146 a space separated list of options, including an explicit version number.
152 Updates version numbers even if they do not match the current expected version
157 Attempts to convert the updated version to a stable version, removing any
162 Attempts to convert the updated version to an alpha version, adding an
163 underscore in an appropriate place.
167 Like bump, but increments the minor segment of the version. This will treat
168 numeric versions as x.yyyzzz format, incrementing the yyy segment.
172 Like bumpminor, but bumping the major segment.
176 Updates Distar and re-runs `perl Makefile.PL`
180 IRC: #web-simple on irc.perl.org
182 Git repository: [git://git.shadowcat.co.uk/p5sagit/Distar](git://git.shadowcat.co.uk/p5sagit/Distar)
184 Git browser: [http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Distar.git;a=summary](http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Distar.git;a=summary)
188 mst - Matt S. Trout (cpan:MSTROUT) <mst@shadowcat.co.uk>
192 haarg - Graham Knop (cpan:HAARG) <haarg@cpan.org>
194 ether - Karen Etheridge (cpan:ETHER) <ether@cpan.org>
196 frew - Arthur Axel "fREW" Schmidt (cpan:FREW) <frioux@gmail.com>
198 Mithaldu - Christian Walde (cpan:MITHALDU) <walde.christian@googlemail.com>
202 Copyright (c) 2011-2015 the Distar ["AUTHOR"](#author) and ["CONTRIBUTORS"](#contributors)
207 This library is free software and may be distributed under the same terms
208 as perl itself. See [http://dev.perl.org/licenses/](http://dev.perl.org/licenses/).