Bug 9316 – Version string should be generated from a git tag

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-14T02:47:31Z
Last change time
2024-12-13T18:03:44Z
Assigned to
No Owner
Creator
Leandro Lucarella
Moved to GitHub: dmd#17569 →

Comments

Comment #0 by leandro.lucarella — 2013-01-14T02:47:31Z
Instead of having to change the version number manually, it would be better to generate the version number from the git tag. For that there is a very handy command called 'describe'. git describe for a commit that have a tag pointing to it, returns the tag name. What's also nice about it is if there isn't the command prints tag-n-hash, where is the name of the last tag found, n is the number of commits on top of it and hash is the current hash. This can make very easy to detect if a compiler is a real release or a development snapshot and would make easier to report bugs for betas, since you can tell exactly which snapshot you're using. I will also suggest using the --dirty option to tell if the working copy was "dirty" (with uncommitted changes) too.
Comment #1 by leandro.lucarella — 2013-01-14T02:54:05Z
Just for reference, this was triggered by https://github.com/D-Programming-Language/dmd/pull/1469
Comment #2 by leandro.lucarella — 2013-04-08T06:45:08Z
Comment #3 by robert.schadek — 2024-12-13T18:03:44Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17569 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB