NAME

Dist::Zilla::Plugin::GitObtain - obtain files from a git repository before building a distribution

VERSION

version 0.06

SYNOPSIS

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

DESCRIPTION

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.

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_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.

AUTHOR

Jonathan Scott Duff <duff@pobox.com>

COPYRIGHT

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.