add a PreviousVersionProvider role #37

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
5 participants
Contributor

yanick commented Apr 12, 2011

Right now, plugins implementing the VersionProvider role
are doing up to two different tasks: retrieving the previous
version number, and incrementing it according to a given scheme.
The goal of the PreviousVersionProvider role is to split those
tasks between the two roles.

Of course, I'm not submitting the patch without having some secret
agenda: I seek this new role as a way to cleanly split the semantic
versioning scheme and the Git component that I'm using in
http://babyl.dyndns.org/techblog/entry/dist-zilla-semanticversion

add a PreviousVersionProvider role
Right now, plugins implementing the VersionProvider role
are doing up to two different tasks: retrieving the previous
version number, and incrementing it according to a given scheme.
The goal of the PreviousVersionProvider role is to split those
tasks between the two roles.

Of course, I'm not submitting the patch without having some secret
agenda: I seek this new role as a way to cleanly split the semantic
versioning scheme and the Git component that I'm using in
http://babyl.dyndns.org/techblog/entry/dist-zilla-semanticversion
Contributor

doherty commented Jun 3, 2011

AHA! I couldn't remember who had been working on a semantic versioning plugin...

Well, if this is added, please remind me that I promised to help you with this. I intend to do so, but it looks a bit stalled for now.

Contributor

yanick commented Jun 6, 2011

Yup, t'was me. :-)

Although this patch is in limbo, we can still go on with the work on the plugins themselves. What needs to be done, basically, is to take the code in Dist::Zilla::Plugin::Author::YANICK::NextSemanticVersion.pm and split it in Dist::Zilla::Plugin::PreviousVersion::Git and Dist::Zilla::Plugin::NextVersion::Semantic (or any other namespace that makes more sense). The work should be straightforward -- one just need the tuits to do it. :-)

Contributor

madsen commented Oct 18, 2011

I'll just point out that since you're simply adding a new module, and not altering any core dzil code, there's no reason you need to get this merged into the dzil core. Just close this pull request, release Dist::Zilla::Role::PreviousVersionProvider on CPAN, and have at it. You should probably have another role for plugins that want to get the previous version (Dist::Zilla::Role::UsePreviousVersionProvider?) that provides a method that takes care of calling the plugin(s) that do PreviousVersionProvider and returning the previous version.

Contributor

yanick commented Oct 19, 2011

I'll prolly end up doing just that. It's just that it's such a teeny little piece of code that it feels overkill to release it on its own. Ah well, we'll see next time I have time to return to my dist::zilla stuff.

Thanks for the comment! :-)

Contributor

madsen commented Oct 25, 2011

BTW, on second thought, Dist::Zilla::Role::PreviousVersionUser is probably a better name for the role that finds & runs the PreviousVersionProvider plugin(s).

Contributor

karenetheridge commented Mar 17, 2013

where's this at now? It sounds promising.

Contributor

karenetheridge commented Aug 2, 2013

::PreviousVersionProviderUser -- which just does $zilla->plugins_with(-PreviousVersionProvider).

Owner

rjbs commented Jul 25, 2015

Is this still relevant?

Owner

rjbs commented Apr 21, 2016

I am closing this as irrelevant/abandoned. Please re-open if this is not the case.

@rjbs rjbs closed this Apr 21, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment