reckon
reckon copied to clipboard
Property for last stable version
I use Asciidoctor to build my documentation, which is convenient because I can simply pass in the version number as an attribute to my documentation. However, I'd like a way of passing in the last "stable" version (a non-snapshot/final version) rather than just the current version, which might be a SNAPSHOT version.
Is there any convenient way to access this information?
Just confirming I'm following. So if you had released 1.2.3 and were now working on 1.3.0-SNAPSHOT, you want to be able to access the 1.2.3 version somehow?
If so, you can't access that right now, though I agree that there's value in it. Probably involves some subset (or all of) the VcsInventory being accessible.
@ajoberstar That's exactly what I'd like. There's a lot of times I might have a snapshot release living in master, which might be several commits ahead of the last stable release, but when I generate my documentation I'd like to have access to both the current version and whatever the last stable version.
@ajoberstar Is there any way to do this temporarily with a buildSrc script? It looks like a lot of API is private or package private.
No, it's all hidden at this point. I'll have to expose something new in the API to make this possible.
Having exactly the same usecase and would like to see this feature. My current workaround is to pass this as an asciidoc attribute:
"git tag -l --sort=-v:refname".execute().in.readLines().find {it ==~ /\d+\.\d+\.\d+/}