On Tuesday, 27 February 2018 at 15:49:37 UTC, Basile B. wrote:

At first glance i can say that this will work perfectly for DUB packages. Once DCD gives a file, the IDE just have to look the parent folders to get the SemVer tag. If the file is in a git repository things might be more complicated.

In most cases its pretty easy from a git repo too, just run 'git describe'. That'll give you the latest (annotated) tag (which SHOULD be the semver number, and generally is for dub projects) and no other output. Nothing to parse or scrape.

If theres been extra commits since the last tag, then there's a little extra suffix appended to git describe's output, but its trivial enough to parse/remove if you need to.

Reply via email to