clojars

http://clojars.org discussion and “support”, see http://status.clojars.org for status.
flyboarder 2019-03-10T04:33:35.004Z

@borkdude @danielcompton I recently updated the clojars shields badge

flyboarder 2019-03-10T04:33:55.004400Z

You can see why this is happening by checking the api data

flyboarder 2019-03-10T04:33:56.004600Z

https://clojars.org/api/artifacts/finitize

flyboarder 2019-03-10T04:34:13.005100Z

The new badge uses the api endpoint and the “latest_release” property

flyboarder 2019-03-10T04:34:35.005600Z

if you want to use the snapshot version, you have to explicitly tell shields to use pre release versions which uses the “latest_version” property instead

flyboarder 2019-03-10T04:35:32.006500Z

Change your current badge url from

<https://img.shields.io/clojars/v/finitize.svg>
To use the pre release path
<https://img.shields.io/clojars/vpre/finitize.svg>

flyboarder 2019-03-10T04:36:42.007Z

ie. nothing wrong with clojars

danielcompton 2019-03-10T08:21:55.007300Z

Ah, thanks!

borkdude 2019-03-10T08:39:05.008Z

Let’s take a step back and see how I got here. I just copy paste the “Version badge” code from Clojars and assume this will work. https://www.dropbox.com/s/99xrqr0np0htzqy/Screenshot%202019-03-10%2009.38.32.png?dl=0

borkdude 2019-03-10T08:39:37.008800Z

And I could have sworn this used to work for my snapshot-only project before. The “invalid response data” message in the badge is new at least for me.

borkdude 2019-03-10T08:44:03.010100Z

anyway, I’ll update it now I know what to do. thanks

flyboarder 2019-03-10T18:13:57.011800Z

@borkdude yes that would have worked for snapshot only projects prior to the recent updates

borkdude 2019-03-10T18:37:28.012Z

where was something updated?

borkdude 2019-03-10T18:42:11.012300Z

I mean, what is “the recent updates”?

flyboarder 2019-03-10T19:37:41.012500Z

@borkdude https://github.com/badges/shields/pull/3128

borkdude 2019-03-10T19:39:37.012900Z

ok, so this basically broke my working badges… which now requires to be changed?

flyboarder 2019-03-10T19:41:13.013700Z

If your project has SNAPSHOT only versions then yes, you will need to update the badge url, nothing changes for projects with existing stable releases

borkdude 2019-03-10T19:41:53.014Z

I read in the issue: > Updates version endpoint which will always return latest stable version or snapshot if no stable versions are available.

flyboarder 2019-03-10T19:42:30.014500Z

Yeah, we had to change that while refactoring the clojars class used to generate the badges

flyboarder 2019-03-10T19:42:43.014900Z

I updated my comment to remove that part

borkdude 2019-03-10T19:42:52.015200Z

I mean, apparently the last bit isn’t working anymore?

flyboarder 2019-03-10T19:46:42.016600Z

Correct, I had to remove that part since there is no longer common code between the release and snapshot badge

borkdude 2019-03-10T19:51:32.016900Z

why not fall back to latest_version if latest_release is null here? https://github.com/flyboarder/shields/blob/e9ebdbedb79767cc5ee39576a5e071d7c31c438c/services/clojars/clojars-release.service.js#L8

flyboarder 2019-03-10T20:03:26.017500Z

@borkdude I just put a new fix forward!

borkdude 2019-03-10T20:04:25.017700Z

cool thanks 🙂