Raku / modules.raku.org

Source code for modules.raku.org - Raku module listing
https://modules.raku.org/
Artistic License 2.0
27 stars 27 forks source link

Fix Travis-CI and Appveyor for ZEF and CPAN modules #142

Open softmoth opened 3 years ago

softmoth commented 3 years ago

So long as GitHub is used for the repo_url, this allows ZEF and CPAN modules to display the Travis and Appveyor status.

Note: In order to re-check Travis status for distributions erroneously marked as 'not set up', this commit either needs to be tagged with [NEWDB], or else have something like this SQL run on the main database:

update dists set travis_status = 'unknown' where dist_source != 'github';

The following changes were needed:

  1. Fill in repo_user and repo for all sources that have a github url

  2. Store $dist->{files} as Perl data, not as a JSON string. This makes it useful while building the object. Marshalling to JSON is done when writing and reading from the DB, rather than repeating the from_json anywhere the data are needed.

  3. Generate a similar $dist->{files} entry for Source::GitHub dists.

  4. Modify Appveyor and Travis post-processors to use the files hash instead of the GitHub-specific {_build}{files} array.

JJ commented 3 years ago

This probably needs a rather extensive review... that includes tests. Please give me some time to take a look.