`git describe`
René J.V. Bertin
rjvbertin at gmail.com
Mon Nov 28 10:18:53 CET 2016
Hi,
Git has a very useful feature when tags are used properly, where each commit increases a counter so that the `git describe` command returns the current release version plus a patchlevel. I use this in certain of my KF5 -devel ports but one can also imagine a MacPorts-devel (or -testing or -beta) port. It's also a more convenient way to check for new releases after doing a pull (instead of browsing through the list of tags).
I expected to see something along the lines of
v2.3.5-N-gc75305a
for the current MacPort-base master/head, but instead I get
v2.0.0-beta1-1966-gc75305a
meaning there have been 1966 commits since the v2.0.0-beta1 release in some distant past. Yet the v2.3.5 tag exists, evidently.
This is part of the git magic I never seem to be able to retain, but I *think* that in order to get this to work you need to use git-release when the tag doesn't exist yet. I know 1 other repository maintained by sufficiently knowledgeable devs where apparently this doesn't work for some obscure reason so I'm certainly not claiming that v2.3.5 wasn't pushed with git-release. Still, it'd be nice to have `git describe` work correctly by the next release.
R.
More information about the macports-dev
mailing list