FS#14358 - aif -v should show version
Attached to Project:
Release Engineering
Opened by Maurel (guy-kde) - Saturday, 18 April 2009, 16:28 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Monday, 26 November 2012, 04:43 GMT
Opened by Maurel (guy-kde) - Saturday, 18 April 2009, 16:28 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Monday, 26 November 2012, 04:43 GMT
|
Details
aif-2009.04.08-1
In the "usage" function I suggest to modify the line with the option -d As this option also make a log, I suggest to tell it in the "usage"-function. I miss a -v or -V for a "version-number/date", ie. the same as the package. |
This task depends upon
Closed by Gerardo Exequiel Pozzi (djgera)
Monday, 26 November 2012, 04:43 GMT
Reason for closing: Deferred
Monday, 26 November 2012, 04:43 GMT
Reason for closing: Deferred
-v -> patch welcome.
adds -v and echos "aif$PKGVER-$PKGREL"
If you want me to patch it a different way then please let me know. (maybe PKGBUILD updating it)
Updated patch added.
added an exit after we print the version. (duh)
maybe we can do this with make.
it should also be distro-agnostic (no package revisions)
will post back with ideas :P
git describe --tags
git rev-parse HEAD
Which will just show the git commit hash, the previous command (git describe --tags) should probably be used though.
Any thoughts?
- maybe we should instead of:
echo "aif $VERSION"
do:
if [ -z "$VERSION" ] ; echo 'unknown version'; else echo "aif $VERSION"; fi
or something
- i don't really understand what the '--tags' does (ie what lightweight (non-annotated) tag are). they definitely look weird (a tag + part of a commit hash?)
ideally i want this:
* if source tree corresponds to a tag, use tag
* if it doesn't, use the commit hash
and this should work both in a git checkout or in a tarball (that has no .git folder).
for uzbl we already do most of this http://github.com/Dieterbe/uzbl/blob/master/misc/hash.sh, just not the "fallback on commit hash if there it's not a tag"
"me: so I did git checkout tagname and when I ran git describe --exact-match HEAD I get fatal: no tag exactly matches
pantsman: it seems to only work for annotated tags
pantsman: I don't know if that's intended or a bug
pantsman: I always found it odd
pantsman: I believe it's preferable to use annotated tags anyway"
It seems what you're looking for is git describe --exact-match HEAD (same as git describe?) but to use it the repo needs to start using annotated tags (git tag -a tagname), otherwise I think the only way would be to use git describe --tags.