diff options
author | Russ Allbery <rra@cpan.org> | 2018-04-28 19:14:21 -0700 |
---|---|---|
committer | Russ Allbery <rra@cpan.org> | 2018-04-28 19:14:21 -0700 |
commit | f7d59f62eb76416aec038b81d39822572c3f33fb (patch) | |
tree | a50781684857c2d5b40212384ddfc09f5de6a93b /share | |
parent | 168f4cfe68c33d864367ad5ea034a96705e10126 (diff) |
Add badge and link for CPAN distribution
Add a Status.io badge for the CPAN version to README.md and a link to
metacpan.org in the thread output if the distribution.cpan key is set
in metadata.json.
Diffstat (limited to 'share')
-rw-r--r-- | share/templates/readme-md.tmpl | 6 | ||||
-rw-r--r-- | share/templates/thread.tmpl | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/share/templates/readme-md.tmpl b/share/templates/readme-md.tmpl index 0418b37..d10ecc0 100644 --- a/share/templates/readme-md.tmpl +++ b/share/templates/readme-md.tmpl @@ -1,6 +1,8 @@ # [% name %] [% version %] -[% IF vcs.travis %] -[![Build Status](https://travis-ci.org/[% vcs.travis %].svg?branch=master)](https://travis-ci.org/[% vcs.travis %]) +[% IF vcs.travis || distribution.cpan %] +[% IF vcs.travis %][![Build status](https://travis-ci.org/[% vcs.travis %].svg?branch=master)](https://travis-ci.org/[% vcs.travis %])[% END -%] +[% IF distribution.cpan %] [![CPAN version](https://img.shields.io/cpan/v/[% distribution.cpan %].svg)](https://metacpan.org/release/[% distribution.cpan %])[% END -%] + [% END %] [% FOREACH copr IN copyrights %]Copyright [% copr.years %] [% copr.holder %]. [% END %]This software is distributed under diff --git a/share/templates/thread.tmpl b/share/templates/thread.tmpl index 94c8d28..f5f4e16 100644 --- a/share/templates/thread.tmpl +++ b/share/templates/thread.tmpl @@ -61,7 +61,9 @@ \link[[% vcs.browse %]] [Git repository][% END %][% IF vcs.travis %] \break \link[https://travis-ci.org/[% vcs.travis %]] - [Travis-CI][% END %][% IF vcs.openhub %] \break + [Travis-CI][% END %][% IF distribution.cpan %] \break + \link[https://metacpan.org/release/[% distribution.cpan %]] + [MetaCPAN][% END %][% IF vcs.openhub %] \break \link[[% vcs.openhub %]] [Open HUB code analysis][% END %][% IF packaging.debian %] \break \link[https://tracker.debian.org/pkg/[% packaging.debian %]] @@ -114,6 +116,10 @@ package tracker] for more information. [% ELSIF debian.personal %] A Debian package is available from my \link[../debian.html][personal repository]. +[% END %][% IF distribution.cpan %] +[% name %] is available from CPAN as the +\link[https://metacpan.org/release/[% distribution.cpan %]] +[[% distribution.cpan %] distribution]. [% END %] [% name %] is maintained using the [% vcs.type %] version control system. To check out the current development tree, [% IF vcs.github %]see |