-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
1,057 additions
and
200 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: CI | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
branches: [ '*' ] | ||
pull_request: | ||
branches: [ '*' ] | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: ['ubuntu-latest', 'macos-latest'] | ||
perl: [ 'latest' ] | ||
name: Perl ${{ matrix.perl }} on ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up perl | ||
uses: shogo82148/actions-setup-perl@v1 | ||
with: | ||
perl-version: ${{ matrix.perl }} | ||
- run: perl -V | ||
- run: cpanm Module::Install | ||
- run: cpanm -n --installdeps . | ||
- run: prove -lv t | ||
|
||
coverage: | ||
runs-on: ubuntu-latest | ||
container: davorg/perl-coveralls:latest | ||
name: Test coverage | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install modules Module::Install | ||
run: cpanm Module::Install | ||
- name: Install dependencies | ||
run: cpanm -n --installdeps . | ||
- name: Coverage | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: cover -test -report Coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/usr/bin/perl | ||
|
||
use strict; | ||
use warnings; | ||
use utf8; | ||
|
||
use URI::PackageURL::CLI; | ||
|
||
exit URI::PackageURL::CLI->run(@ARGV) unless caller(); | ||
|
||
1; | ||
|
||
__END__ | ||
=encoding utf-8 | ||
=head1 NAME | ||
purl-tool - PackageURL tool | ||
=head1 SYNOPSIS | ||
purl-tool [OPTIONS]...STRING | ||
purl-tool [--help|--man|--version] | ||
Options: | ||
--help Brief help message | ||
--man Full documentation | ||
--version Print version | ||
--download-url Download URL | ||
--repository-url Repository URL | ||
-0, --null Return NULL char instead of new line | ||
--format=FORMAT Output format | ||
--dumper Data::Dumper format (--format=dumper) | ||
--json JSON output format (--format=json) | ||
--yaml YAML output format (--format=yaml) | ||
--env ENV output format (--format=env) | ||
Examples: | ||
purl-tool pkg:cpan/GDT/URI-PackageURL@2.00 --json | jq | ||
wget $(purl-tool pkg:cpan/GDT/URI-PackageURL@2.00 --download-url) | ||
=head1 DESCRIPTION | ||
C<purl-tool> PackageURL tool | ||
=head1 EXAMPLES | ||
Parse the given PackageURL string and return JSON and send the STDOUT to L<jq>: | ||
B<purl-tool pkg:cpan/GDT/URI-PackageURL@2.00 --json | jq> | ||
Download the package from the repository using PackageURL string: | ||
B<wget $(purl-tool pkg:cpan/GDT/URI-PackageURL@2.00 --download-url)> | ||
=head1 AUTHOR | ||
L<Giuseppe Di Terlizzi|https://metacpan.org/author/gdt> | ||
=head1 COPYRIGHT AND LICENSE | ||
Copyright © 2022-2023 L<Giuseppe Di Terlizzi|https://metacpan.org/author/gdt> | ||
You may use and distribute this module according to the same terms | ||
that Perl is distributed under. |
Oops, something went wrong.