The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Github::ReleaseFetcher - Fetch either the latest or a particular named version of a file in a release from github

VERSION

version 1.000

SYNOPSIS

    my @files = Github::ReleaseFetcher::fetch(".", "SeleniumHQ", "selenium", qr/\.jar$/ );

DESCRIPTION

Scrapes the github release page and reads the hrefs from the 'Assets' section. This is because there isn't a publicly accessable machine-readable version of this listing. As such you need this instead of freebasing JSON directly into your veins.

Relies both on the 'latest' redirect for releases on github, and the expanded_assets page. If either of these stop working, so will this module.

SUBROUTINES

fetch(STRING $outdir, STRING $owner, STRING $project, [REGEXP $search, STRING $rename, STRING $version, HTTP::Tiny $ua])

Fetches the file(s) from the latest release within $owner's $project (optionally matching the regex described by $search).

Optionally fetch it from a specified version instead, rename the output files via the passed substitution, and pass in a configured HTTP::Tiny user agent to do the fetch.

In the event of a rename (which will result in multiple files being named the same thing), the last lexically sorted result will hold precedence.

Returns list of files written, or in the case that outdir is a false value, the URIs where said assets reside.

BUGS

Please report any bugs or feature requests on the bugtracker website https://github.com/teodesian/perl-Github-ReleaseFetcher/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHORS

Current Maintainers:

  • George S. Baugh <george@troglodyne.net>

COPYRIGHT AND LICENSE

Copyright (c) 2024 Troglodyne LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.