-
Notifications
You must be signed in to change notification settings - Fork 20
allow Dyna to report its own version #62
Comments
Not sure it matters, but I'll point out that On Tue, Jul 23, 2013 at 2:50 AM, Jason Eisner [email protected]:
|
Here's what I've got using these commands, which run at the time you ask for them (not by the Makefile).
Example output:
|
Output format looks on the right track, but a few suggestions / concerns:
Did you look at the StackOverflow links starting at the URL I posted above, which detail how other people have handled this? It's a gold mine. Including "git describe" and "git rev-list" and someone's script at https://gist.github.com/Abizern/208825, not to mention git's own solution ... |
I'm not sure I see any difference in the links you provided (except that they can give a shorter sha1 hash). What am I missing? Also, feel free to add a target to the Makefile which creates a VERSION file and I'll hook it up. |
"0.4" is some number @nwf declared as Dyna's version (e.g. perl5 or Python 2.7). I suppose it doesn't really mean at the time being because we don't have any tagged releases or packaged versions. If you ask |
Should look more like this:
Counting revisions relative to a tagged version. Many people recommend "git describe" for this purpose -- it provides more user-friendly info, and as an officially supported feature of git, it is likely to work long-term and in situations with branches or uncommitted revisions. I am unable to play much with git describe since none of our revisions are tagged, but here is the sales pitch: http://gitfu.wordpress.com/2008/05/25/git-describe-great-another-way-to-refer-to-commits/
Yes, and correctly so, since the last 2005 release was 0.3.10. (But I'll pretend below that 0.3 is actually our own previous tagged version in this git repo.)
If the version is reported as 0.4, then that ought to mean, unambiguously, that it is the official tagged 0.4 release! Think about novice users. People may not understand the significance of the "Commit:" line, and may easily think that the version number is the important info, which means that they will mail us "I'm working with Dyna 0.4" (which is incomplete) or fail to understand why two users running 0.4 are not getting the same results. So for something that is not an official tagged release but rather comes between 0.3 and 0.4, I would prefer to report a version number like "Dyna 0.3 rev 477" or "Dyna 0.4 pre-release 477." This also makes it easy to see that one version is later than another. (Regarding whether we should report the version as a patchlevel on 0.3 or a pre-release of 0.4, I'm not sure how to handle that -- wouldn't we want to maintain those on separate git branches if 0.4 is internally under development but we still want to push patches to 0.3?) If we didn't have git describe, then here are ways we'd get the elements above:
Also, here's one person's solution for getting the URL if we want to display that:
|
Counting commits? really? that can't be a good way to identify a version. On Tue, Jul 23, 2013 at 12:18 PM, Jason Eisner [email protected]:
|
You must have missed that in the initial batch of StackOverflow links: lots of people are doing it and so is git describe itself, so it's recommended. That's not the complete ID (which is why we also provide the SHA). But it is concise and user-friendly information that immediately shows how out-of-date someone is, as well as reminding us that after 477 commits maybe it's time for a new version number. Again, here's a sales pitch: http://gitfu.wordpress.com/2008/05/25/git-describe-great-another-way-to-refer-to-commits/ |
I've made a few changes. We still don't have tagged releases so it doesn't like quite the way you suggest.
|
There is a VERSION file which is updated whenever |
Can I close this? |
Can we now decree that we are at released version 1.4.0, and tag the On Fri, Aug 2, 2013 at 10:18 AM, Tim Vieira [email protected]:
|
Any thoughts @nwf? On Fri, Aug 2, 2013 at 12:38 PM, Jason Eisner [email protected]:
|
I recommend supporting the traditional GNUish
dyna --version
, as well as aversion
command at the repl. Should print git version id and the date of that version (possibly also the build date).Where do these strings come from? There seems to be a consensus that they should be defined by the makefile at build time (e.g., dumped into a file), rather than by activating git keyword substitution. See http://stackoverflow.com/questions/2696975/how-to-add-revision-and-build-date-to-source and several useful links there.
@nwf wrote on an email thread:
The text was updated successfully, but these errors were encountered: