Open kseistrup opened 10 months ago
This makes sense to me. Thank you for suggesting it.
I guess ideally it would print the hash and time of the last commit in the repository being built, though I'll have to think a little bit about what's the cleanest way to implement that.
In ArchLinux AUR, packages that are built from the latest commit often use a form of git describe --long
to calculate the version string, e.g.:
$ cd "$repo"
$ git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//g'
0.6.4.r1.gf89e790
So this is the first (or second, I can't remember if it's 0-based) commit in the “0.6.4” line, and the short git hash is “f89e790”.
This obviously only works if there are annotated tags.
See e.g.:
for more suggestions.
PS: But even a version string that doesn't have a date or commit hash would be better than nothing (e.g., just “v0.6.4” in the example above).
Edge built from 8fdf7f76ffa167497a7e9e9228b26b1f2dcf95e9 has no
-version
/-V
option:It would be much easier for everyone if e.g.
edge -version
could show relevant version information.