perlalien / alien-build-plugin-download-github Goto Github PK
View Code? Open in Web Editor NEWAlien::Build plugin to download from GitHub
Alien::Build plugin to download from GitHub
That mock the download negotiator and fetch plugins.
https://gist.github.com/plicease/7cf0d4e282efe80c740e16ef6d148ef1
# Failed test 'live tests'
# at t/alien_build_plugin_download_github.t line 91.
# Caught exception in subtest: Can't use string ("[
# {
# "url": "https://api.gi"...) as an ARRAY ref while "strict refs" in use at /tmp/loop_over_bdir-7556-ioxMTR/Alien-Build-Plugin-Download-GitHub-0.02-0/blib/lib/Alien/Build/Plugin/Download/GitHub.pm line 64.
t/alien_build_plugin_download_github.t ..
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests
Right now we only allow fetching the raw git tag, which might not include things like configure
etc.
For when the asset really is the thing that you need and it doesn't need to be further extracted! I think the GitLab version of this already has this.
https://gist.github.com/plicease/f5464741dc69edc9c67e29988e6cfd61
# Failed test 'live tests'
# at t/alien_build_plugin_download_github.t line 91.
# Caught exception in subtest: error fetching https://api.github.com/repos/Perl5-Alien/dontpanic/releases: 403 Forbidden at /tmp/loop_over_bdir-14705-f0UB_Z/Alien-Build-1.63-0/blib/lib/Alien/Build/Plugin/Fetch/HTTPTiny.pm line 75.
t/alien_build_plugin_download_github.t ..
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests
Alien-Build
as of 2.40 supports sending headers via HTTP, so we should now be able to send an personal authorization token as a header to avoid at least some of the usage limits that cause test failures. Doing so would be a more robust solution that #6 which passes as an argument, and may not be supported anymore anyway. I also noticed there is a bug in #6 where I used different names for the environment variable (doh!).
Question becomes where should we go looking for the token? GitHub Actions apparently stores a PAT in secrets.GITHUB_TOKEN
so that seems to be at least one place. We should also check an environment variable dedicated to AB so that users can have a token for just that and isolate it from their "default" token. What about a file?
This doesn't work:
For example with the default version regex, if the versions have a v
prefix.
It is not correct to assume only "tar.gz" format files, because some GitHub repositories offer "zip" format files.
https://github.com/PerlAlien/Alien-Build-Plugin-Download-GitHub/blob/main/lib/Alien/Build/Plugin/Download/GitHub.pm#L135
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.