Alien-Build-Plugin-Download-GitHub
view release on metacpan or search on metacpan
};
DESCRIPTION
This plugin will download releases from GitHub. It is generally
preferred over Alien::Build::Plugin::Download::Git for packages that
are released on GitHub, as it has much fewer dependencies and is more
reliable.
PROPERTIES
github_user
The GitHub user or org that owns the repository. This property is
required.
github_repo
The GitHub repository name. This property is required.
include_assets
[deprecated: use the asset* properties instead]
Defaulting to false, this option designates whether to include the
assets of releases in the list of candidates for download. This should
be one of three types of values:
true value
The full list of assets will be included in the list of candidates.
false value
No assets will be included in the list of candidates.
regular expression
If a regular expression is provided, this will include assets that
match by name.
tags_only
Boolean value for those repositories that do not upgrade their tags to
releases. There are two different endpoints. One for releases
<https://developer.github.com/v3/repos/releases/#list-releases-for-a-repository>
and one for simple tags
<https://developer.github.com/v3/repos/#list-tags>. The default is to
interrogate the former for downloads. Passing a true value for
"tags_only" interrogates the latter for downloads.
version
Regular expression that can be used to extract a version from a GitHub
tag. The default ( qr/^v?(.*)$/ ) is reasonable for many GitHub
repositories.
prefer
How to sort candidates for selection. This should be one of three types
of values:
code reference
This will be used as the prefer hook.
true value (not code reference)
Use Alien::Build::Plugin::Prefer::SortVersions.
false value
Don't set any preference at all. The order returned from GitHub will
be used if no other prefer plugins are specified. This may be
reasonable for at least some GitHub repositories. This is the
default.
asset
Download from assets instead of via tag. This option is incompatible
with tags_only.
asset_name
Regular expression which the asset name should match. The default is
qr/\.tar\.gz$/.
asset_format
The format of the asset. This is passed to
Alien::Build::Plugin::Extract::Negotiate so any format supported by
that is valid.
[version 0.10]
If this is set to none then no extractor will be added. This allows for
you to write your own extractor code, or use a non-standard one.
asset_convert_version
This is an optional code reference which can be used to modify the
version. For example, if the release version is prefixed with a v You
could do this:
plugin 'Download::GitHub' => (
github_user => 'PerlAlien',
github_repo => 'dontpanic',
asset => 1,
asset_convert_version => sub {
my $version = shift;
$version =~ s/^v//;
$version;
},
);
ENVIRONMENT
ALIEN_BUILD_GITHUB_TOKEN GITHUB_TOKEN GITHUB_PAT
If one of these environment variables are set, then the GitHub API
( run in 0.412 second using v1.01-cache-2.11-cpan-02777c243ea )