On Fri, Dec 15, 2017 at 11:04 AM Avram Lubkin <av...@rockhopper.net> wrote:
> Badges are pretty popular in GitHub though there don't seem to be many > that provide information on distros that have packages for a project. This > would be very useful because, at least for me, the first thing I do when I > want to try a new project is see if a package is available for the distro > I'm working with, usually Fedora or CentOS. > > I searched around, but couldn't find anything that existed already (please > let me know if I missed it), so I made static badges for one of my > projects, python-enlighten[1], but this requires remembering to update them > when a new version of Fedora comes out. > > I tried to create a dynamic one, but it isn't exactly what I want. It's > based on if a branch exists and starts with 'f' or 'e', not if there is a > stable package for that branch. Also, the branch names are not consistent > between EPEL 6 and EPEL 7, so it would be better to just get the number. > Might as well just use the number for Fedora too for consistency. > > Static Fedora: > https://img.shields.io/badge/Fedora-26,_27-lightgrey.svg > > Static EPEL: > https://img.shields.io/badge/EPEL-6,_7-lightgrey.svg > > > Dynamic Fedora: > > https://img.shields.io/badge/dynamic/json.svg?uri=https://pdc.fedoraproject.org/rest_api/v1/component-branches/?global_component=python-enlighten;fields=name;active=true;type=rpm&query=$.results[?(@.name.startsWith( > "f"))].name&label=Fedora > > Dynamic EPEL: > > https://img.shields.io/badge/dynamic/json.svg?uri=https://pdc.fedoraproject.org/rest_api/v1/component-branches/?global_component=python-enlighten;fields=name;active=true;type=rpm&query=$.results[?(@.name.startsWith( > "e"))].name&label=EPEL > > I'm also not sure the best place to point them to. shields.io does let > you set a target for both the left and the right sides, but I just set the > target within readme.rst and pointed both badges to the Bodhi updates page > for the package. > > Anyone have a better way to generate dynamic badges? Should badge > generation be a part of the Fedora infrastructure? > > For an alternative approach, would it be better to show the latest stable > version in the latest Fedora. Something like this, but dynamic: > > https://img.shields.io/badge/Fedora_27-1.0.7-lightgrey.svg > > > [1] https://github.com/Rockhopper-Technologies/enlighten > > I would be very interested in this if it were dynamic. My preference would be for a dynamic badge service which shows the latest stable `nevr` for either a specific Fedora/EPEL, with the option to use keywords like "latest" and "rawhide" in addition to specific releases like "F27". Upstream users could choose to add a Fedora 26 badge, a Fedora 27 badge, and a Fedora Rawhide badge to advertise the available versions in each of those, or they could just advertise the latest stable with a badge for the latest released Fedora version.
_______________________________________________ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org