Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property for last stable version #118

Open
sgarfinkel opened this issue Aug 6, 2019 · 5 comments
Open

Property for last stable version #118

sgarfinkel opened this issue Aug 6, 2019 · 5 comments

Comments

@sgarfinkel
Copy link

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?

@ajoberstar
Copy link
Owner

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.

@sgarfinkel
Copy link
Author

@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.

@sgarfinkel
Copy link
Author

@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.

@ajoberstar
Copy link
Owner

No, it's all hidden at this point. I'll have to expose something new in the API to make this possible.

@keykey7
Copy link

keykey7 commented Aug 16, 2020

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+/}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants