Feature Request: SemVer support for thresholds
remy-tiitre opened this issue · comments
It would be a nice touch to be able to add semver as thresholds in a pattern "-c green 2.4.5=orange 2.4.0=red" so that anything below or equal to 2.4.0 would be red, anything between 2.4.5 and 2.4.0 would be orange and anything over 2.4.5 (2.4.6 for example) would be green.
Hi @remy-tiitre, I just added a PR for semver support. Would you be interested in testing it out? I'm pretty confident in the change, but I would like to see how it fits with your use-case.
I kind of implemented it with my own python script already as well. But how can I test it, its probably not in released version yet?
I kind of implemented it with my own python script already as well. But how can I test it, its probably not in released version yet?
You would need to clone the repo, and switch to the feature branch:
git clone git@github.com:jongracecox/anybadge.git
cd anybadge
git checkout jongracecox/feature-add-semver-support
You could just take a look at the PR here, which includes some detail: #46
If you think it looks good I can merge it and create a release candidate which you could play with more easily by pip installing.
@remy-tiitre, I took the liberty of cutting a 1.8.0rc1 release candidate, which you can install with
pip install anybadge==1.8.0rc1
Hi @remy-tiitre, are you still interested in testing the semver support I added? If not, I will go ahead and cut a release with this current implementation and close the issue - I was just hoping to get your feedback.
Closing as this has been implemented.