I've been tinkering with the dist.ini file:

[Git::NextVersion] [PodVersion] [PkgVersion] [NextRelease] [ReadmeAnyFromPod] type = markdown location = root phase = release [Git::Check] [Git::Commit] allow_dirty = README.mkdn allow_dirty = Changes [Git::Tag] [Git::Push] [GatherDir] [PruneCruft] [ManifestSkip] [MetaYAML] [License] [Readme] [ExtraTests] [ExecDir] [ShareDir] [MakeMaker] [Manifest] [TestRelease] [FakeRelease]

I have it so that only the modules, a README.mkdn file, and a Changes files get uploaded to github. In the generated distro, the Changes file looks fine. But in the version that gets uploaded to GitHub from my repository's root, there is an unsightly {{$NEXT}} line in there. I'm wondering if there is an easy way to get rid of it using the tools available in Dist::Zilla.

Solution

The nifty Dist::Zilla::Plugin::Run came to the rescue. Here is how you do it:

[NextRelease] [Run::AfterRelease] run = cp Changes tmp && cp %n-%v/Changes . <snip> [Git::Commit] allow_dirty = README.mkdn allow_dirty = Changes [Git::Tag] [Git::Push] [Run::AfterRelease / MyAppAfter] run = cp tmp/Changes Changes

The [Run::AfterRelease] bit runs the command in the next line. The first run command has two commands. First it copies the Changes file with the {{$next}} code in it over to the tmp directory. Next, it gets overwritten by the "clean" version of the Changes file. The second run command simply moves the Changes file in the tmp directory back to the repository's root directory.

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks


In reply to [SOLVED] Dist::Zilla Getting rid of {{$NEXT}} at top of Changes file on GitHub by nysus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.