Dist::Zilla::Plugin::GitObtain - obtain files from a git repository before building a distribution
version 0.06
In your dist.ini:
[GitObtain] ;project = url tag rakudo = git://github.com/rakudo/rakudo.git 2010.06 http-daemon = git://gitorious.org/http-daemon/mainline.git
This module uses Git::Wrapper to obtain files from git repositories before building a distribution.
Projects downloaded via git would be placed into the current directory by default. To specify an alternate location, use the --git_dir option. This directory and any intermediate directories in the path will be created if they do not already exist.
--git_dir
Following the [GitObtain] section header is the list of git repositories to download and include in the distribution. Each repository is specified by the name of the directory in which the repository will be checked out, an equals sign (=), the URL to the git repository, and an optional "tag" to checkout. Anything that may be passed to git checkout may be used for the "tag"; the default is master. The repository directory will be created beneath the path specified in the section heading. So,
[GitObtain]
=
git checkout
master
[GitObtain] --git_dir = foo my_project = git://github.com/example/my_project.git another_project = git://github.com/example/another_project.git
will create a foo directory beneath the current directory and my_project and another_project directories inside of the foo directory. Each of the my_project and another_project directories will be git repositories.
To specify multiple target directories in which to obtain git repositories, use alternate section names in the section header:
[GitObtain / alpha ] --git_dir = foo my_project = git://github.com/example/my_project.git [GitObtain / beta ] --git_dir = bar another_project = git://github.com/example/another_project.git
The above example config contains 2 GitObtain sections called alpha and beta. The alpha section creates repositories in the foo directory and the beta section creates repositories in the bar directory.
alpha
beta
Jonathan Scott Duff <duff@pobox.com>
This software is copyright (c) 2010 by Jonathan Scott Duff
This is free sofware; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language itself.
To install Dist::Zilla::Plugin::GitObtain, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dist::Zilla::Plugin::GitObtain
CPAN shell
perl -MCPAN -e shell install Dist::Zilla::Plugin::GitObtain
For more information on module installation, please visit the detailed CPAN module installation guide.