Dist-Zilla-Plugin-Run-0.020000755001750001750 012134626220 16042 5ustar00torstentorsten000000000000README100644001750001750 56112134626220 16765 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020 This archive contains the distribution Dist-Zilla-Plugin-Run, version 0.020: Run external commands at specific phases of Dist::Zilla This software is copyright (c) 2010 by L. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Changes100644001750001750 472212134626220 17423 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020Revision history for Dist-Zilla-Plugin-Run 0.020 2013-04-21 02:02:21 Europe/Berlin - Switching to [@Author::GETTY] dzil bundle - Adding .travis.yml for travis-ci 0.019 2013-04-15 07:52:25 America/Phoenix - Delay evaluation of some vars (like dist version) until needed. Thanks, Tatsuhiko Miyagawa! 0.018 2013-03-02 18:46:39 Europe/Berlin - Added new options, cleaned up documentation 0.017 2013-02-16 21:20:54 America/Phoenix - Fix silly bug in tests for non-unix platforms 0.016 2013-02-13 07:49:47 America/Phoenix - Add 'run_no_trial' option for running commands only when it is not a trial build/release. 0.015 2013-02-04 01:25:50 Europe/Berlin - Copy examples for all runners to Synposis on main page 0.014 2013-01-18 20:21:24 America/Phoenix - Add Run::AfterMint plugin for running commands after making a new dist. 0.013 2011-11-09 06:23:08 America/Phoenix - Fix Pod spelling error pointed out by Debian Perl Group (rt-72278). 0.012 2011-11-05 17:30:03 America/Phoenix - Add '%x' for perl path (similar to $^X) - Use strict and warnings in each module - Test fixes 0.011 2011-10-28 08:25:04 America/Phoenix - Explicitly stringify '%a' to keep String::Formatter happy. Make sure it's tested. Closes rt-72008. Thanks to Olivier Mengué (dolmen) for reporting. 0.010 2011-09-10 11:06:33 America/Phoenix - Define '%p' as the OS path separator in case anybody ever needs cross-platform dist.ini commands - Enable the tests for the Run::Test plugin - Make tests cross-platform 0.009 2011-09-07 18:34:14 Europe/Moscow - added the [Run::Test] plugin 0.008 2011-08-09 09:31:33 America/Phoenix - Stream command output incrementally instead of waiting until the command is done. (RWSTAUNER) Closes gh-4. Thanks to SamuraiJack for the suggestion. - Show correct exit status on command failure. 0.007 2011-08-07 20:30:39 America/Phoenix - Define other (constant) string format conversions (%n, %v); Retain positional %s for backward compatibility. (RWSTAUNER) 0.006 2011-05-21 02:58:17 Europe/Berlin - Fixed wrong bangpath 0.005 2011-04-29 22:54:18 Europe/Berlin 0.005 2011-01-21 13:21:08 Europe/Moscow 0.004 2010-12-14 21:19:54 Europe/Berlin - Minimal pod changes 0.003 2010-12-14 03:18:00 Europe/Berlin - Complete Change of API 0.002 2010-12-13 18:07:27 Europe/Berlin 0.001 2010-12-12 04:14:54 Europe/Berlin - First release LICENSE100644001750001750 4404012134626220 17152 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020This software is copyright (c) 2010 by L. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2010 by L. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2010 by L. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End dist.ini100644001750001750 165612134626220 17577 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020name = Dist-Zilla-Plugin-Run author = Torsten Raudssus L license = Perl_5 copyright_holder = L copyright_year = 2010 [@Author::GETTY] no_changelog_from_git = 1 [CheckChangesHasContent] [Prereqs] Moose = 1.15 Dist::Zilla = 4.200002 Test::DZil = 4.200002 ; used by Dist::Zilla Test::File::ShareDir = 0 namespace::autoclean = 0.11 Path::Class = 0.16 String::Formatter = 0.102082 ; core modules File::Spec = 0 IPC::Open3 = 0 Config = 0 [ContributorsFromGit] ; print a little extra output so we know it's working as expected [Bootstrap::lib] [Run::AfterBuild] run = echo "Built version %v in %d... So far so good" [Run::AfterRelease] run = echo "Congratulations, %v is out! Now just sit back and wait for the bug reports :-)" META.yml100644001750001750 1440012134626220 17413 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020--- abstract: 'Run external commands at specific phases of Dist::Zilla' author: - 'Torsten Raudssus L' build_requires: Test::LoadAllModules: 0.021 Test::More: 0.96 configure_requires: ExtUtils::MakeMaker: 6.30 dynamic_config: 0 generated_by: 'Dist::Zilla version 4.300034, CPAN::Meta::Converter version 2.120921' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Dist-Zilla-Plugin-Run requires: Config: 0 Dist::Zilla: 4.200002 File::Spec: 0 IPC::Open3: 0 Moose: 1.15 Path::Class: 0.16 String::Formatter: 0.102082 Test::DZil: 4.200002 Test::File::ShareDir: 0 namespace::autoclean: 0.11 resources: homepage: https://github.com/Getty/p5-dist-zilla-plugin-run repository: https://github.com/Getty/p5-dist-zilla-plugin-run.git version: 0.020 x_Dist_Zilla: perl: version: 5.014002 plugins: - class: Dist::Zilla::Plugin::GatherDir name: '@Author::GETTY/@Basic/GatherDir' version: 4.300034 - class: Dist::Zilla::Plugin::PruneCruft name: '@Author::GETTY/@Basic/PruneCruft' version: 4.300034 - class: Dist::Zilla::Plugin::ManifestSkip name: '@Author::GETTY/@Basic/ManifestSkip' version: 4.300034 - class: Dist::Zilla::Plugin::MetaYAML name: '@Author::GETTY/@Basic/MetaYAML' version: 4.300034 - class: Dist::Zilla::Plugin::License name: '@Author::GETTY/@Basic/License' version: 4.300034 - class: Dist::Zilla::Plugin::Readme name: '@Author::GETTY/@Basic/Readme' version: 4.300034 - class: Dist::Zilla::Plugin::ExtraTests name: '@Author::GETTY/@Basic/ExtraTests' version: 4.300034 - class: Dist::Zilla::Plugin::ExecDir name: '@Author::GETTY/@Basic/ExecDir' version: 4.300034 - class: Dist::Zilla::Plugin::ShareDir name: '@Author::GETTY/@Basic/ShareDir' version: 4.300034 - class: Dist::Zilla::Plugin::MakeMaker name: '@Author::GETTY/@Basic/MakeMaker' version: 4.300034 - class: Dist::Zilla::Plugin::Manifest name: '@Author::GETTY/@Basic/Manifest' version: 4.300034 - class: Dist::Zilla::Plugin::TestRelease name: '@Author::GETTY/@Basic/TestRelease' version: 4.300034 - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Author::GETTY/@Basic/ConfirmRelease' version: 4.300034 - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Author::GETTY/@Basic/UploadToCPAN' version: 4.300034 - class: Dist::Zilla::Plugin::Git::NextVersion name: '@Author::GETTY/Git::NextVersion' version: 2.013 - class: Dist::Zilla::Plugin::PkgVersion name: '@Author::GETTY/PkgVersion' version: 4.300034 - class: Dist::Zilla::Plugin::MetaConfig name: '@Author::GETTY/MetaConfig' version: 4.300034 - class: Dist::Zilla::Plugin::MetaJSON name: '@Author::GETTY/MetaJSON' version: 4.300034 - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@Author::GETTY/PodSyntaxTests' version: 4.300034 - class: Dist::Zilla::Plugin::Repository name: '@Author::GETTY/Repository' version: 0.19 - class: Dist::Zilla::Plugin::GithubMeta name: '@Author::GETTY/GithubMeta' version: 0.28 - class: Dist::Zilla::Plugin::TravisYML name: '@Author::GETTY/TravisYML' version: 0.96 - class: Dist::Zilla::Plugin::InstallRelease name: '@Author::GETTY/InstallRelease' version: 0.008 - class: Dist::Zilla::Plugin::Authority name: '@Author::GETTY/Authority' version: 1.006 - class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch name: '@Author::GETTY/Git::CheckFor::CorrectBranch' version: 0.006 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: test type: requires name: '@Author::GETTY/TestsOfAuthorGETTY' version: 4.300034 - class: Dist::Zilla::Plugin::NextRelease name: '@Author::GETTY/NextRelease' version: 4.300034 - class: Dist::Zilla::Plugin::PodWeaver name: '@Author::GETTY/PodWeaver' version: 3.101641 - class: Dist::Zilla::Plugin::Git::Check name: '@Author::GETTY/@Git/Check' version: 2.013 - class: Dist::Zilla::Plugin::Git::Commit name: '@Author::GETTY/@Git/Commit' version: 2.013 - class: Dist::Zilla::Plugin::Git::Tag name: '@Author::GETTY/@Git/Tag' version: 2.013 - class: Dist::Zilla::Plugin::Git::Push name: '@Author::GETTY/@Git/Push' version: 2.013 - class: Dist::Zilla::Plugin::CheckChangesHasContent name: CheckChangesHasContent version: 0.006 - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: requires name: Prereqs version: 4.300034 - class: Dist::Zilla::Plugin::ContributorsFromGit name: ContributorsFromGit version: 0.006 - class: Dist::Zilla::Plugin::Run::AfterBuild name: Run::AfterBuild version: ~ - class: Dist::Zilla::Plugin::Run::AfterRelease name: Run::AfterRelease version: ~ - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: 4.300034 - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: 4.300034 - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: 4.300034 - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: 4.300034 - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: 4.300034 - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: 4.300034 zilla: class: Dist::Zilla::Dist::Builder config: is_trial: 0 version: 4.300034 x_authority: cpan:GETTY x_contributors: - 'Al Newkirk ' - 'Nickolay Platonov ' - 'Randy Stauner ' - 'Tatsuhiko Miyagawa ' - 'Torsten Raudssus ' MANIFEST100644001750001750 176612134626220 17266 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020Changes LICENSE MANIFEST META.json META.yml Makefile.PL README dist.ini lib/Dist/Zilla/Plugin/Run.pm lib/Dist/Zilla/Plugin/Run/AfterBuild.pm lib/Dist/Zilla/Plugin/Run/AfterMint.pm lib/Dist/Zilla/Plugin/Run/AfterRelease.pm lib/Dist/Zilla/Plugin/Run/BeforeBuild.pm lib/Dist/Zilla/Plugin/Run/BeforeRelease.pm lib/Dist/Zilla/Plugin/Run/Release.pm lib/Dist/Zilla/Plugin/Run/Role/Runner.pm lib/Dist/Zilla/Plugin/Run/Test.pm t/00-load.t t/10_build_phase.t t/20_formatter.t t/30_all_phases.t t/40_test_phase.t t/50_mint.t t/release-pod-syntax.t test_data/all_phases/dist.ini test_data/all_phases/lib/Digest/MD5.js test_data/all_phases/script/run.pl test_data/build_phase/dist.ini test_data/build_phase/lib/Digest/MD5.js test_data/build_phase/script/after_build.pl test_data/build_phase/script/before_build.pl test_data/build_phase/script/no_trial.pl test_data/global/config.ini test_data/profiles/default/profile.ini test_data/test_phase/dist.ini test_data/test_phase/lib/Digest/MD5.js test_data/test_phase/script/test.pl META.json100644001750001750 2266312134626220 17575 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020{ "abstract" : "Run external commands at specific phases of Dist::Zilla", "author" : [ "Torsten Raudssus L" ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 4.300034, CPAN::Meta::Converter version 2.120921", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Dist-Zilla-Plugin-Run", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.30" } }, "develop" : { "requires" : { "Test::Pod" : "1.41" } }, "runtime" : { "requires" : { "Config" : "0", "Dist::Zilla" : "4.200002", "File::Spec" : "0", "IPC::Open3" : "0", "Moose" : "1.15", "Path::Class" : "0.16", "String::Formatter" : "0.102082", "Test::DZil" : "4.200002", "Test::File::ShareDir" : "0", "namespace::autoclean" : "0.11" } }, "test" : { "requires" : { "Test::LoadAllModules" : "0.021", "Test::More" : "0.96" } } }, "release_status" : "stable", "resources" : { "homepage" : "https://github.com/Getty/p5-dist-zilla-plugin-run", "repository" : { "type" : "git", "url" : "https://github.com/Getty/p5-dist-zilla-plugin-run.git", "web" : "https://github.com/Getty/p5-dist-zilla-plugin-run" } }, "version" : "0.020", "x_Dist_Zilla" : { "perl" : { "version" : "5.014002" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::GatherDir", "name" : "@Author::GETTY/@Basic/GatherDir", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@Author::GETTY/@Basic/PruneCruft", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@Author::GETTY/@Basic/ManifestSkip", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Author::GETTY/@Basic/MetaYAML", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@Author::GETTY/@Basic/License", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@Author::GETTY/@Basic/Readme", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::ExtraTests", "name" : "@Author::GETTY/@Basic/ExtraTests", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@Author::GETTY/@Basic/ExecDir", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@Author::GETTY/@Basic/ShareDir", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", "name" : "@Author::GETTY/@Basic/MakeMaker", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Author::GETTY/@Basic/Manifest", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Author::GETTY/@Basic/TestRelease", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Author::GETTY/@Basic/ConfirmRelease", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Author::GETTY/@Basic/UploadToCPAN", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::Git::NextVersion", "name" : "@Author::GETTY/Git::NextVersion", "version" : "2.013" }, { "class" : "Dist::Zilla::Plugin::PkgVersion", "name" : "@Author::GETTY/PkgVersion", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Author::GETTY/MetaConfig", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Author::GETTY/MetaJSON", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@Author::GETTY/PodSyntaxTests", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::Repository", "name" : "@Author::GETTY/Repository", "version" : "0.19" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "@Author::GETTY/GithubMeta", "version" : "0.28" }, { "class" : "Dist::Zilla::Plugin::TravisYML", "name" : "@Author::GETTY/TravisYML", "version" : "0.96" }, { "class" : "Dist::Zilla::Plugin::InstallRelease", "name" : "@Author::GETTY/InstallRelease", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@Author::GETTY/Authority", "version" : "1.006" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch", "name" : "@Author::GETTY/Git::CheckFor::CorrectBranch", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "test", "type" : "requires" } }, "name" : "@Author::GETTY/TestsOfAuthorGETTY", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@Author::GETTY/NextRelease", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "name" : "@Author::GETTY/PodWeaver", "version" : "3.101641" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "name" : "@Author::GETTY/@Git/Check", "version" : "2.013" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "name" : "@Author::GETTY/@Git/Commit", "version" : "2.013" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "name" : "@Author::GETTY/@Git/Tag", "version" : "2.013" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "name" : "@Author::GETTY/@Git/Push", "version" : "2.013" }, { "class" : "Dist::Zilla::Plugin::CheckChangesHasContent", "name" : "CheckChangesHasContent", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "requires" } }, "name" : "Prereqs", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::ContributorsFromGit", "name" : "ContributorsFromGit", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Run::AfterBuild", "name" : "Run::AfterBuild", "version" : null }, { "class" : "Dist::Zilla::Plugin::Run::AfterRelease", "name" : "Run::AfterRelease", "version" : null }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "4.300034" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "4.300034" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "4.300034" } }, "x_authority" : "cpan:GETTY", "x_contributors" : [ "Al Newkirk ", "Nickolay Platonov ", "Randy Stauner ", "Tatsuhiko Miyagawa ", "Torsten Raudssus " ] } t000755001750001750 012134626220 16226 5ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.02000-load.t100644001750001750 17512134626220 17672 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/t#!/usr/bin/env perl use strict; use warnings; use Test::More tests => 1; BEGIN { use_ok('Dist::Zilla::Plugin::Run'); } 50_mint.t100644001750001750 145012134626220 20026 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/tuse strict; use warnings; use Test::More 0.88; use Test::DZil; use Path::Class; use Test::File::ShareDir -share => { -module => { 'Dist::Zilla::MintingProfile::Default' => 'test_data/profiles' }, }; { my $tzil = Minter->_new_from_profile( [ Default => 'default' ], { name => 'DZT-Minty' ,}, { global_config_root => dir('test_data/global')->absolute }, ); $tzil->mint_dist(); my $dir = $tzil->tempdir->subdir(qw(mint empty_dir)); ok -d $dir, 'created directory in mint dir'; is_deeply [$dir->children], [], 'dir is empty but exists'; like $tzil->slurp_file('mint/lib/DZT/Minty.pm'), qr/package DZT::Minty;/, 'minted regular file'; like $tzil->slurp_file('mint/minted_at.txt'), qr/DZT-Minty minted at \d+/, 'created file the hard way'; } done_testing; Makefile.PL100644001750001750 335512134626220 20103 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020 use strict; use warnings; use ExtUtils::MakeMaker 6.30; my %WriteMakefileArgs = ( "ABSTRACT" => "Run external commands at specific phases of Dist::Zilla", "AUTHOR" => "Torsten Raudssus L", "BUILD_REQUIRES" => {}, "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.30" }, "DISTNAME" => "Dist-Zilla-Plugin-Run", "EXE_FILES" => [], "LICENSE" => "perl", "NAME" => "Dist::Zilla::Plugin::Run", "PREREQ_PM" => { "Config" => 0, "Dist::Zilla" => "4.200002", "File::Spec" => 0, "IPC::Open3" => 0, "Moose" => "1.15", "Path::Class" => "0.16", "String::Formatter" => "0.102082", "Test::DZil" => "4.200002", "Test::File::ShareDir" => 0, "namespace::autoclean" => "0.11" }, "TEST_REQUIRES" => { "Test::LoadAllModules" => "0.021", "Test::More" => "0.96" }, "VERSION" => "0.020", "test" => { "TESTS" => "t/*.t" } ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { my $tr = delete $WriteMakefileArgs{TEST_REQUIRES}; my $br = $WriteMakefileArgs{BUILD_REQUIRES}; for my $mod ( keys %$tr ) { if ( exists $br->{$mod} ) { $br->{$mod} = $tr->{$mod} if $tr->{$mod} > $br->{$mod}; } else { $br->{$mod} = $tr->{$mod}; } } } unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) { my $br = delete $WriteMakefileArgs{BUILD_REQUIRES}; my $pp = $WriteMakefileArgs{PREREQ_PM}; for my $mod ( keys %$br ) { if ( exists $pp->{$mod} ) { $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod}; } else { $pp->{$mod} = $br->{$mod}; } } } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); 20_formatter.t100644001750001750 145012134626220 21057 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/tuse strict; use warnings; use Test::More 0.88; use Dist::Zilla::Tester; { my $tzil = Dist::Zilla::Tester->from_config( { dist_root => 'test_data/all_phases' }, ); my $dir = 'fake'; my %f = ( a => 'TestDzilPhases-1.01.tar.gz', n => 'TestDzilPhases', d => $dir, v => '1.01', ); my $formatter = $tzil->plugin_named('Run::AfterRelease')->build_formatter({ archive => $f{a}, dir => $dir, pos => [qw(run run reindeer)] }); is $formatter->format('snowflakes/%v|%n\\%s,%s,%s,%s in %d(%a)'), "snowflakes/$f{v}|$f{n}\\run,run,reindeer, in $f{d}($f{a})", 'correct formatting'; is $formatter->format('%v%s%n'), "$f{v}$f{n}", 'ran out of %s (but not the constants)'; } done_testing; 30_all_phases.t100644001750001750 223412134626220 21171 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/tuse strict; use warnings; use Test::More 0.88; use lib 't/lib'; use Path::Class; use Dist::Zilla::Tester; { my $tzil = Dist::Zilla::Tester->from_config( { dist_root => 'test_data/all_phases' }, ); $tzil->release; my $dir = $tzil->tempdir->subdir('build'); my @txt = split /\n/, $tzil->slurp_file(file(qw(source script phases.txt))); my %f = ( a => 'TestDzilPhases-1.01.tar.gz', n => 'TestDzilPhases', d => $dir, v => '1.01', x => Dist::Zilla::Plugin::Run::Role::Runner->current_perl_path, ); # test constant conversions as well as positional %s for backward compatibility my @exp = split /\n/, <from_config( { dist_root => 'test_data/test_phase' }, ); $tzil->build(); my $dir = $tzil->tempdir->subdir('build'); $tzil->run_tests_in($dir); my $test_file = $tzil->tempdir->file(qw(build test.txt)); ok(-f $test_file, 'Test script has been ran'); my $content = $tzil->slurp_file(file(qw(build test.txt))); is($content, "test $dir Digest-MD5-0.01", 'Correct `test` result'); } done_testing; 10_build_phase.t100644001750001750 274512134626220 21342 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/tuse strict; use warnings; use Test::More 0.88; use Path::Class; use Dist::Zilla::Tester; sub test_build { my %test = @_; my $tzil = Dist::Zilla::Tester->from_config( { dist_root => 'test_data/build_phase' }, ); $tzil->is_trial(1) if $test{trial}; $tzil->build; my $before_build_result = $tzil->tempdir->file(qw(source BEFORE_BUILD.txt)); ok(-f $before_build_result, 'Before build script has been ran'); my $after_build_result = $tzil->slurp_file(file(qw(build lib AFTER_BUILD.txt))); ok($after_build_result eq 'after_build', 'Correct `after_build` result'); my $no_trial_file = $tzil->tempdir->file(qw(build lib NO_TRIAL.txt)); if( $test{trial} ){ ok( (! -e $no_trial_file), 'is trial - file not written' ); like $tzil->log_messages->[-1], qr{\[Run::AfterBuild\] Not executing, because trial: %x script%pno_trial.pl "%s"}, 'logged skipping of non-trial command'; } else { ok( ( -f $no_trial_file), 'non-trial - file present' ); is $no_trial_file->slurp, ':-P', 'non-trial content'; my $script = file(script => 'no_trial.pl'); like $tzil->log_messages->[-2], qr{\[Run::AfterBuild\] Executing: .+ \Q$script\E .+}, 'logged execution'; like $tzil->log_messages->[-1], qr{\[Run::AfterBuild\] Command executed successfully}, 'logged command status'; } } test_build(); test_build(trial => 1); done_testing; release-pod-syntax.t100644001750001750 45012134626220 22256 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/t#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval "use Test::Pod 1.41"; plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; all_pod_files_ok(); global000755001750001750 012134626220 21173 5ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_dataconfig.ini100644001750001750 16412134626220 23262 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_data/global[%User] name = Command Runner email = run@example.com [%Rights] license_class = Perl_5 copyright_holder = Any Body Plugin000755001750001750 012134626220 21745 5ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/lib/Dist/ZillaRun.pm100644001750001750 622112134626220 23210 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/lib/Dist/Zilla/Pluginuse strict; use warnings; package Dist::Zilla::Plugin::Run; BEGIN { $Dist::Zilla::Plugin::Run::AUTHORITY = 'cpan:GETTY'; } { $Dist::Zilla::Plugin::Run::VERSION = '0.020'; } # ABSTRACT: Run external commands at specific phases of Dist::Zilla 1; __END__ =pod =head1 NAME Dist::Zilla::Plugin::Run - Run external commands at specific phases of Dist::Zilla =head1 VERSION version 0.020 =head1 SYNOPSIS [Run::AfterBuild] run = script/do_this.pl --dir %s --version %s run = script/do_that.pl [Run::BeforeBuild] run = script/do_this.pl --version %s run = script/do_that.pl [Run::BeforeRelease] run = script/myapp_before1.pl %s run = script/myapp_before2.pl %n %v run_no_trial = script/no_execution_on_trial.pl %n %v [Run::Release] run = script/myapp_deploy1.pl %s run = deployer.pl --dir %d --tgz %a --name %n --version %v run_no_trial = script/no_execution_on_trial.pl --dir %d --tgz %a --name %n --version %v [Run::AfterRelease] run = script/myapp_after.pl --archive %s --version %s ; %p can be used as the path separator if you have contributors on a different OS run = script%pmyapp_after.pl --archive %s --version %s [Run::AfterRelease / MyAppAfter] run = script/myapp_after.pl --archive %s --version %s [Run::Test] run = script/tester.pl --name %n --version %v some_file.ext run_if_release = ./Build install run_if_release = make install [Run::AfterMint] run = some command %d =head1 DESCRIPTION Run arbitrary commands at various L phases. =head1 PARAMETERS =head2 run Run the specific command at the specific Dist::Zilla phase given by the plugin, like I<[Run::Release]> runs on release phase. =head2 run_no_trial Only run the given command if this isn't a I build or release. =head2 run_trial Only run the given command if this is a I build or release. =head2 run_if_release Only run the given command if this is a release. =head2 run_no_release Only run a given command if this isn't a release. =head1 CONVERSIONS The following conversions/format specifiers are defined for passing as arguments to the specified commands (though not all values are available at all phases). =over 4 =item * C<%a> the archive of the release (available to all C<*Release> phases) =item * C<%d> the directory in which the dist was built (or minted) (not in C) =item * C<%n> the dist name =item * C<%p> path separator ('/' on Unix, '\\' on Win32... useful for cross-platform dist.ini files) =item * C<%v> the dist version =item * C<%x> full path to the current perl interpreter (like $^X but from L) =back Additionally C<%s> is retained for backward compatibility. Each occurrence is replaced by a different value (like the regular C function). Individual plugins define their own values for the positional replacement of C<%s>. =head1 AUTHOR Torsten Raudssus L =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2010 by L. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut all_phases000755001750001750 012134626220 22046 5ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_datadist.ini100644001750001750 131612134626220 23653 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_data/all_phasesname = TestDzilPhases abstract = test all phases version = 1.01 author = No One license = None copyright_holder = Nobody ; choose/generate files to include [GatherDir] [License] [Run::BeforeBuild] run = %x script%prun.pl before_build %s %n %v .%d.%a. %x [Run::AfterBuild] run = %x script%prun.pl after_build %n %v %d %s %s %v .%a. %x [Run::BeforeRelease] run = %x script%prun.pl before_release %n -d %d %s -v %v .%a. %x [Run::Release] run = %x script%prun.pl release %s %n %v %d/a %d/b %a %x [Run::AfterRelease] run = %x script%prun.pl after_release %d %v %s %s %n %a %x ; manifest (after all generated files) [Manifest] ;[FakeRelease] test_phase000755001750001750 012134626220 22072 5ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_datadist.ini100644001750001750 75712134626220 23667 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_data/test_phasename = Digest-MD5 abstract = Some clever yet compact description version = 0.01 author = Clever Guy license = LGPL_3_0 copyright_holder = Clever guy ; choose/generate files to include [GatherDir] [PruneCruft] [ManifestSkip] [License] [Run::Test] run = %x script%ptest.pl "%d" %n-%v ; build system [ExecDir] [ShareDir] ; manifest (after all generated files) [Manifest] [TestRelease] [FakeRelease] build_phase000755001750001750 012134626220 22212 5ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_datadist.ini100644001750001750 107512134626220 24021 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_data/build_phasename = Digest-MD5 abstract = Some clever yet compact description version = 0.01 author = Clever Guy license = LGPL_3_0 copyright_holder = Clever guy ; choose/generate files to include [GatherDir] [PruneCruft] [ManifestSkip] [License] [Run::BeforeBuild] run = %x script%pbefore_build.pl [Run::AfterBuild] run = %x script%pafter_build.pl "%s" run_no_trial = %x script%pno_trial.pl "%s" ; build system [ExecDir] [ShareDir] ; manifest (after all generated files) [Manifest] Run000755001750001750 012134626220 22511 5ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/lib/Dist/Zilla/PluginTest.pm100644001750001750 301612134626220 24126 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/lib/Dist/Zilla/Plugin/Runuse strict; use warnings; package Dist::Zilla::Plugin::Run::Test; BEGIN { $Dist::Zilla::Plugin::Run::Test::AUTHORITY = 'cpan:GETTY'; } { $Dist::Zilla::Plugin::Run::Test::VERSION = '0.020'; } # ABSTRACT: execute a command of the distribution after build use Moose; with qw( Dist::Zilla::Role::TestRunner Dist::Zilla::Plugin::Run::Role::Runner ); use namespace::autoclean; sub test { my ($self, $dir) = @_; $self->call_script({ dir => $dir }); } 1; __END__ =pod =head1 NAME Dist::Zilla::Plugin::Run::Test - execute a command of the distribution after build =head1 VERSION version 0.020 =head1 SYNOPSIS [Run::Test] run = script/tester.pl --name %n --version %v some_file.ext =head1 DESCRIPTION This plugin executes the specified command during the test phase. =head1 CAVEAT Unlike the other [Run::*] plugins, when running the scripts, the current working directory will be the directory with newly built distribution. This is the way Dist::Zilla works. =head1 POSITIONAL PARAMETERS See L for the list of common formatting variables available to all plugins. There are no positional parameters for this plugin. =head1 AUTHOR Torsten Raudssus L =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2010 by L. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut script000755001750001750 012134626220 23352 5ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_data/all_phasesrun.pl100755001750001750 40212134626220 24632 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_data/all_phases/script#!/usr/bin/env perl use strict; use warnings; use Path::Class; #my $fh = dir($ARGV[ 0 ], 'lib')->file('AFTER_BUILD.txt')->openw(); my $fh = file(__FILE__)->parent->file('phases.txt')->open('>>'); binmode $fh; print $fh join(' ', @ARGV) . "\n"; close $fh; script000755001750001750 012134626220 23376 5ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_data/test_phasetest.pl100755001750001750 25312134626220 25035 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_data/test_phase/script#!/usr/bin/env perl use strict; use warnings; use Path::Class; my $fh = dir($ARGV[ 0 ])->file('test.txt')->openw(); printf $fh join(' ', test => @ARGV); close($fh); Release.pm100644001750001750 307612134626220 24575 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/lib/Dist/Zilla/Plugin/Runuse strict; use warnings; package Dist::Zilla::Plugin::Run::Release; BEGIN { $Dist::Zilla::Plugin::Run::Release::AUTHORITY = 'cpan:GETTY'; } { $Dist::Zilla::Plugin::Run::Release::VERSION = '0.020'; } # ABSTRACT: execute a command of the distribution on release use Moose; with qw( Dist::Zilla::Role::Releaser Dist::Zilla::Plugin::Run::Role::Runner ); use namespace::autoclean; sub release { my ( $self, $archive ) = @_; $self->call_script({ archive => $archive, pos => [$archive] }); } 1; __END__ =pod =head1 NAME Dist::Zilla::Plugin::Run::Release - execute a command of the distribution on release =head1 VERSION version 0.020 =head1 SYNOPSIS [Run::Release] run = script/myapp_deploy.pl %s or [Run::Release / MyAppDeploy] run = script/myapp_deploy.pl %s =head1 DESCRIPTION This plugin executes the specified command for the release process. This way you can specify a custom release command without needing any other C plugin. =head1 POSITIONAL PARAMETERS See L for the list of common formatting variables available to all plugins. For backward compatibility: =over 4 =item * The 1st C<%s> will be replaced by the archive of the release. =back =head1 AUTHOR Torsten Raudssus L =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2010 by L. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Digest000755001750001750 012134626220 24033 5ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_data/all_phases/libMD5.js100644001750001750 14012134626220 25071 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_data/all_phases/lib/Digestvar template = new Shotenjin.Joose.Template({ /*tjfile(template/MD5.tj.html)tjfile*/ })default000755001750001750 012134626220 23202 5ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_data/profilesprofile.ini100644001750001750 16712134626220 25467 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_data/profiles/default[Run::AfterMint] run = mkdir %d%pempty_dir run = %x -e "print join q[ ], @ARGV, time" %n minted at > %d%pminted_at.txt Digest000755001750001750 012134626220 24057 5ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_data/test_phase/libMD5.js100644001750001750 14012134626220 25115 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_data/test_phase/lib/Digestvar template = new Shotenjin.Joose.Template({ /*tjfile(template/MD5.tj.html)tjfile*/ })AfterMint.pm100644001750001750 242512134626220 25103 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/lib/Dist/Zilla/Plugin/Runuse strict; use warnings; package Dist::Zilla::Plugin::Run::AfterMint; BEGIN { $Dist::Zilla::Plugin::Run::AfterMint::AUTHORITY = 'cpan:GETTY'; } { $Dist::Zilla::Plugin::Run::AfterMint::VERSION = '0.020'; } # ABSTRACT: Execute a command after a new dist is minted use Moose; with qw( Dist::Zilla::Role::AfterMint Dist::Zilla::Plugin::Run::Role::Runner ); use namespace::autoclean; sub after_mint { my ($self, $param) = @_; $self->call_script({ dir => $param->{mint_root}, minting => 1, }); } 1; __END__ =pod =head1 NAME Dist::Zilla::Plugin::Run::AfterMint - Execute a command after a new dist is minted =head1 VERSION version 0.020 =head1 SYNOPSIS [Run::AfterMint] run = some command %d =head1 DESCRIPTION This plugin executes the specified command after minting a new dist. =head1 CONVERSIONS See L for the list of common formatting variables available to all plugins. =head1 AUTHOR Torsten Raudssus L =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2010 by L. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Digest000755001750001750 012134626220 24177 5ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_data/build_phase/libMD5.js100644001750001750 14012134626220 25235 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_data/build_phase/lib/Digestvar template = new Shotenjin.Joose.Template({ /*tjfile(template/MD5.tj.html)tjfile*/ })AfterBuild.pm100644001750001750 312412134626220 25230 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/lib/Dist/Zilla/Plugin/Runuse strict; use warnings; package Dist::Zilla::Plugin::Run::AfterBuild; BEGIN { $Dist::Zilla::Plugin::Run::AfterBuild::AUTHORITY = 'cpan:GETTY'; } { $Dist::Zilla::Plugin::Run::AfterBuild::VERSION = '0.020'; } # ABSTRACT: execute a command of the distribution after build use Moose; with qw( Dist::Zilla::Role::AfterBuild Dist::Zilla::Plugin::Run::Role::Runner ); use namespace::autoclean; sub after_build { my ($self, $param) = @_; $self->call_script({ dir => $param->{ build_root }, pos => [$param->{ build_root }, sub { $self->zilla->version }] }); } 1; __END__ =pod =head1 NAME Dist::Zilla::Plugin::Run::AfterBuild - execute a command of the distribution after build =head1 VERSION version 0.020 =head1 SYNOPSIS [Run::AfterBuild] run = script/do_this.pl --dir %s --version %s run = script/do_that.pl =head1 DESCRIPTION This plugin executes the specified command after building the dist. =head1 POSITIONAL PARAMETERS See L for the list of common formatting variables available to all plugins. For backward compatibility: =over 4 =item * The 1st C<%s> will be replaced by the directory in which the dist was built. =item * The 2nd C<%s> will be replaced by the dist version. =back =head1 AUTHOR Torsten Raudssus L =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2010 by L. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut script000755001750001750 012134626220 23516 5ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_data/build_phaseno_trial.pl100755001750001750 20412134626220 26001 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_data/build_phase/script#!/usr/bin/env perl use strict; use warnings; use Path::Class; dir($ARGV[0], 'lib')->file('NO_TRIAL.txt')->openw()->print(":-P"); BeforeBuild.pm100644001750001750 267212134626220 25400 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/lib/Dist/Zilla/Plugin/Runuse strict; use warnings; package Dist::Zilla::Plugin::Run::BeforeBuild; BEGIN { $Dist::Zilla::Plugin::Run::BeforeBuild::AUTHORITY = 'cpan:GETTY'; } { $Dist::Zilla::Plugin::Run::BeforeBuild::VERSION = '0.020'; } # ABSTRACT: execute a command of the distribution before build use Moose; with qw( Dist::Zilla::Role::BeforeBuild Dist::Zilla::Plugin::Run::Role::Runner ); use namespace::autoclean; sub before_build { my ($self) = @_; $self->call_script({ pos => [sub { $self->zilla->version }] }); } 1; __END__ =pod =head1 NAME Dist::Zilla::Plugin::Run::BeforeBuild - execute a command of the distribution before build =head1 VERSION version 0.020 =head1 SYNOPSIS [Run::BeforeBuild] run = script/do_this.pl --version %s run = script/do_that.pl =head1 DESCRIPTION This plugin executes the specified command before building the dist. =head1 POSITIONAL PARAMETERS See L for the list of common formatting variables available to all plugins. For backward compatibility: =over 4 =item * The 1st C<%s> will be replaced by the dist version. =back =head1 AUTHOR Torsten Raudssus L =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2010 by L. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Role000755001750001750 012134626220 23412 5ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/lib/Dist/Zilla/Plugin/RunRunner.pm100644001750001750 1304212134626220 25401 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/lib/Dist/Zilla/Plugin/Run/Roleuse strict; use warnings; package Dist::Zilla::Plugin::Run::Role::Runner; BEGIN { $Dist::Zilla::Plugin::Run::Role::Runner::AUTHORITY = 'cpan:GETTY'; } { $Dist::Zilla::Plugin::Run::Role::Runner::VERSION = '0.020'; } # ABSTRACT: Role for the packages of Dist::Zilla::Plugin::Run use Moose::Role; use String::Formatter 0.102082 (); use namespace::autoclean; use File::Spec (); # core use IPC::Open3 (); # core use Config (); # core has perlpath => ( is => 'ro', isa => 'Str', builder => 'current_perl_path', ); has run => ( is => 'ro', isa => 'ArrayRef', default => sub { [] }, ); has run_if_trial => ( is => 'ro', isa => 'ArrayRef', default => sub { [] }, ); has run_no_trial => ( is => 'ro', isa => 'ArrayRef', default => sub { [] }, ); has run_if_release => ( is => 'ro', isa => 'ArrayRef', default => sub { [] }, ); has run_no_release => ( is => 'ro', isa => 'ArrayRef', default => sub { [] }, ); around BUILDARGS => sub { my ( $orig, $class, @args ) = @_; my $built = $class->$orig(@args); foreach my $dep (qw( notexist_fatal )) { if ( exists $built->{$dep} ) { warn(" !\n ! $class attribute '$dep' is deprecated and has no effect.\n !\n"); delete $built->{$dep}; } } return $built; }; sub call_script { my ( $self, $params ) = @_; foreach my $run_cmd (@{$self->run}) { $self->run_cmd($run_cmd, $params); } my $is_trial = $self->zilla->is_trial ? 1 : 0; foreach my $run_cmd (@{$self->run_if_trial}) { if ($is_trial) { $self->run_cmd($run_cmd, $params); } else { $self->log("Not executing, because no trial: $run_cmd"); } } foreach my $run_cmd (@{$self->run_no_trial}) { if ($is_trial) { $self->log("Not executing, because trial: $run_cmd"); } else { $self->run_cmd($run_cmd, $params); } } my $is_release = defined $ENV{'DZIL_RELEASING'} && $ENV{'DZIL_RELEASING'} == 1 ? 1 : 0; foreach my $run_cmd (@{$self->run_if_release}) { if ($is_release) { $self->run_cmd($run_cmd, $params); } else { $self->log("Not executing, because no release: $run_cmd"); } } foreach my $run_cmd (@{$self->run_no_release}) { if ($is_release) { $self->log("Not executing, because release: $run_cmd"); } else { $self->run_cmd($run_cmd, $params); } } } sub run_cmd { my ( $self, $run_cmd, $params ) = @_; if ($run_cmd) { my $command = $self->build_formatter($params)->format($run_cmd); $self->log("Executing: $command"); # autoflush STDOUT so we can see command output right away local $| = 1; # combine stdout and stderr for ease of proxying through the logger my $pid = IPC::Open3::open3(my ($in, $out), undef, $command); while(defined(my $line = <$out>)){ chomp($line); # logger appends its own newline $self->log($line); } # zombie repellent waitpid($pid, 0); my $status = ($? >> 8); $self->log_fatal("Command exited with status $status ($?)") if $status; $self->log("Command executed successfully"); } } around mvp_multivalue_args => sub { my ($original, $self) = @_; my @res = $self->$original(); push @res, qw( run run_no_trial run_if_trial run_if_release run_no_release ); @res; }; my $path_separator = (File::Spec->catfile(qw(a b)) =~ m/^a(.+?)b$/)[0]; sub build_formatter { my ( $self, $params ) = @_; # stringify build directory my $dir = $params->{dir} || $self->zilla->built_in; $dir = $dir ? "$dir" : ''; my $codes = { # not always available # explicitly pass a string (not an object) [rt-72008] a => defined $params->{archive} ? "$params->{archive}" : '', # build dir or mint dir d => $dir, # dist name n => sub { $self->zilla->name }, # backward compatibility (don't error) s => '', # portability p => $path_separator, x => sub { $self->perlpath }, }; # available during build, not mint unless( $params->{minting} ){ $codes->{v} = sub { $self->zilla->version }; } # positional replace (backward compatible) if( my @pos = @{ $params->{pos} || [] } ){ # where are you defined-or // operator? $codes->{s} = sub { my $s = shift(@pos); $s = $s->() if ref $s eq 'CODE'; defined($s) ? $s : ''; }; } return String::Formatter->new({ codes => $codes }); } sub current_perl_path { # see perlvar $^X my $perl = $Config::Config{perlpath}; if ($^O ne 'VMS') { $perl .= $Config::Config{_exe} unless $perl =~ m/$Config::Config{_exe}$/i; } return $perl; } 1; # vim: set ts=4 sts=4 sw=4 expandtab smarttab: __END__ =pod =head1 NAME Dist::Zilla::Plugin::Run::Role::Runner - Role for the packages of Dist::Zilla::Plugin::Run =head1 VERSION version 0.020 =head1 DESCRIPTION This is the base role for all the plugins L delivers. You don't need this. =head1 AUTHOR Torsten Raudssus L =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2010 by L. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut AfterRelease.pm100644001750001750 316712134626220 25560 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/lib/Dist/Zilla/Plugin/Runuse strict; use warnings; package Dist::Zilla::Plugin::Run::AfterRelease; BEGIN { $Dist::Zilla::Plugin::Run::AfterRelease::AUTHORITY = 'cpan:GETTY'; } { $Dist::Zilla::Plugin::Run::AfterRelease::VERSION = '0.020'; } # ABSTRACT: execute a command of the distribution after release use Moose; with qw( Dist::Zilla::Role::AfterRelease Dist::Zilla::Plugin::Run::Role::Runner ); use namespace::autoclean; sub after_release { my ( $self, $archive ) = @_; $self->call_script({ archive => $archive, pos => [$archive, sub { $self->zilla->version }] }); } 1; __END__ =pod =head1 NAME Dist::Zilla::Plugin::Run::AfterRelease - execute a command of the distribution after release =head1 VERSION version 0.020 =head1 SYNOPSIS [Run::AfterRelease] run = script/myapp_after.pl --archive %s --version %s or [Run::AfterRelease / MyAppAfter] run = script/myapp_after.pl %s %s =head1 DESCRIPTION This plugin executes the specified command after releasing. =head1 POSITIONAL PARAMETERS See L for the list of common formatting variables available to all plugins. For backward compatibility: =over 4 =item * The 1st C<%s> will be replaced by the archive of the release. =item * The 2nd C<%s> will be replaced by the dist version. =back =head1 AUTHOR Torsten Raudssus L =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2010 by L. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut BeforeRelease.pm100644001750001750 301612134626220 25712 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/lib/Dist/Zilla/Plugin/Runuse strict; use warnings; package Dist::Zilla::Plugin::Run::BeforeRelease; BEGIN { $Dist::Zilla::Plugin::Run::BeforeRelease::AUTHORITY = 'cpan:GETTY'; } { $Dist::Zilla::Plugin::Run::BeforeRelease::VERSION = '0.020'; } # ABSTRACT: execute a command of the distribution before release use Moose; with qw( Dist::Zilla::Role::BeforeRelease Dist::Zilla::Plugin::Run::Role::Runner ); use namespace::autoclean; sub before_release { my ( $self, $archive ) = @_; $self->call_script({ archive => $archive, pos => [$archive] }); } 1; __END__ =pod =head1 NAME Dist::Zilla::Plugin::Run::BeforeRelease - execute a command of the distribution before release =head1 VERSION version 0.020 =head1 SYNOPSIS [Run::BeforeRelease] run = script/myapp_before.pl %s or [Run::BeforeRelease / MyAppBefore] run = script/myapp_before.pl %s =head1 DESCRIPTION This plugin executes the specified command before releasing. =head1 POSITIONAL PARAMETERS See L for the list of common formatting variables available to all plugins. For backward compatibility: =over 4 =item * The 1st C<%s> will be replaced by the archive of the release. =back =head1 AUTHOR Torsten Raudssus L =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2010 by L. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut after_build.pl100755001750001750 25512134626220 26460 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_data/build_phase/script#!/usr/bin/env perl use strict; use warnings; use Path::Class; my $fh = dir($ARGV[ 0 ], 'lib')->file('AFTER_BUILD.txt')->openw(); printf $fh "after_build"; close($fh); before_build.pl100755001750001750 17312134626220 26620 0ustar00torstentorsten000000000000Dist-Zilla-Plugin-Run-0.020/test_data/build_phase/script#!/usr/bin/env perl use strict; use warnings; use Path::Class; my $fh = file("BEFORE_BUILD.txt")->openw(); close($fh);