Darn. There's probably not a phase between "gather existing files" and
"generate some more files", because the role for this would have to be run
in between those two, deleting files from the first before they could be
added in the second.
On Fri, Feb 7, 2014 at 4:48 PM, Ryan C. Thompson via RT <
bug-Dist-Zilla-Plugin-CopyFilesFromBuild@rt.cpan.org> wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=92828 >
>
> On Fri Feb 07 19:42:48 2014, garfieldnate@gmail.com wrote:
> > Thanks Karen. That does fix the problem but it violates DRY. Now if I
> > change the settings for one plugin I also have to change them for the
> other.
> > I'm not sure what the diff is between this and that other plugin...
> >
> > I think a simple "clobber" or "write_over" or "replace" = 1 option would
> be
> > very helpful for this plugin.
> >
> >
> > On Fri, Feb 7, 2014 at 4:36 PM, Ryan C. Thompson via RT <
> > bug-Dist-Zilla-Plugin-CopyFilesFromBuild@rt.cpan.org> wrote:
> >
> > > <URL:
https://rt.cpan.org/Ticket/Display.html?id=92828 >
> > >
> > > On Fri Feb 07 19:33:49 2014, ETHER wrote:
> > > > On 2014-02-07 16:08:44, RTHOMPSON wrote:
> > > >
> > > > > Maybe dzil was modified to disallow adding the same file twice? The
> > > > > only solution I can think of is to add these files to the
> > > > > "exclude_filename" option of GatherDir.
> > > >
> > > >
> > > > You're right on both counts - you can't add a file twice, by any
> > > > mechanism, and you're both gathering the existing file in the repo
> (by
> > > > [GatherDir] or [Git::GatherDir]) as well as [ReadmeAnyFromPod]
> > > > attempting to create a new one. The answer indeed is to tell
> > > > GatherDir to skip this file.
> > > >
> > > > e.g. see what I'm doing here:
> > > >
> > > >
https://metacpan.org/source/ETHER/Dist-Zilla-PluginBundle-Author-
> > > > ETHER-0.049/lib/Dist/Zilla/PluginBundle/Author/ETHER.pm#L332
> > >
> > >
> > > Semi-unrelated question: what's the difference between
> CopyFileFromBuild
> > > and CopyFilesFromRelease? I guess the latter only triggers when you
> > > actually make a release instead of on every build?
> > >
>
> The problem is that the CopyFilesFromBuild plugin is not directly involved
> with the problem, so there is nothing that it can do directly to fix it.
> This is why you have to violate DRY and manually tell the GatherDir plugin
> to exclude the files. The only other solution I can think of is rather
> messy: The CopyFilesFromBuild plugin would have to arrange for itself to
> run before the GatherDir plugin, and it would have to modify the GatherDir
> plugin's options to add the appropriate file exclusions. And then the
> solution only works for the GatherDir plugin and not any alternative plugin
> that one might use that would accidentally add the files.
>