shields icon indicating copy to clipboard operation
shields copied to clipboard

Stop prepending "Maven Central" versions with "v"

Open cstamas opened this issue 10 months ago • 4 comments

Are you experiencing an issue with...

shields.io

🐞 Description

It is misleading, as there are artifacts that have versions like "v1.2.3" (version starts with letter "v"), so shield would show "vv1.2.3". Just leave the blue field "as is" (verbatim as version is).

🔗 Link to the badge

https://img.shields.io/maven-central/v/org.apache.maven.resolver/maven-resolver.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.apache.maven.resolver/maven-resolver

💡 Possible Solution

Just drop the prepended "v" from version in blue field.

cstamas avatar Feb 08 '25 13:02 cstamas

Badge tested using npm run badge https://img.shields.io/maven-central/v/org.apache.maven.resolver/maven-resolver.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.apache.maven.resolver/maven-resolver Output is available here

github-actions[bot] avatar Feb 08 '25 13:02 github-actions[bot]

The prefix v is already conditional. See https://github.com/badges/shields/blob/1809d1ebbc8ed5ec2b07070c2c5c013886e4bf3f/services/version.js#L259 and https://github.com/badges/shields/blob/1809d1ebbc8ed5ec2b07070c2c5c013886e4bf3f/services/text-formatters.js#L134.

kwin avatar Feb 09 '25 21:02 kwin

Whatever, by by default the version should not be "v" prefixed. This is wrong, and actually the opposite that should be: If I want "v" prefix, I'd need to turn something ON, and not turn OFF to lose some prefix being automatically added.

cstamas avatar Feb 09 '25 21:02 cstamas

Whatever, by by default the version should not be "v" prefixed. This is wrong, and actually the opposite that should be: If I want "v" prefix, I'd need to turn something ON, and not turn OFF to lose some prefix being automatically added.

Agree, it has not benefit or purpose because it constantly repeats.

michael-o avatar Feb 11 '25 19:02 michael-o