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
Task Type Bug Report
Category AIF
Status Closed
Assigned To No-one
Architecture All
Severity Very Low
Priority Normal
Reported Version 2009.02
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

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
Comment by Dieter Plaetinck (Dieter_be) - Wednesday, 24 June 2009, 19:35 GMT
logfiles are already shown for both -d and -l.

-v -> patch welcome.
Comment by Thomas Dziedzic (tomd123) - Tuesday, 11 August 2009, 21:18 GMT
Quick aif version patch.
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)
Comment by Thomas Dziedzic (tomd123) - Tuesday, 11 August 2009, 21:21 GMT
Well this is embarrassing. I forgot to end the v case with ;;.

Updated patch added.
Comment by Thomas Dziedzic (tomd123) - Tuesday, 11 August 2009, 21:24 GMT
Final version, I promise.

added an exit after we print the version. (duh)
Comment by Dieter Plaetinck (Dieter_be) - Wednesday, 12 August 2009, 19:42 GMT
we need something that will automatically tell us the correct git tag (or git commit hash, if there is no git tag).
maybe we can do this with make.

it should also be distro-agnostic (no package revisions)
Comment by Thomas Dziedzic (tomd123) - Sunday, 11 April 2010, 15:19 GMT
I forgot about this bug! XD
will post back with ideas :P
Comment by Thomas Dziedzic (tomd123) - Sunday, 11 April 2010, 15:26 GMT
how about using something like
git describe --tags
Comment by Thomas Dziedzic (tomd123) - Sunday, 11 April 2010, 16:25 GMT
we could also use
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?
Comment by Thomas Dziedzic (tomd123) - Sunday, 25 April 2010, 14:40 GMT
would this be good?
Comment by Dieter Plaetinck (Dieter_be) - Sunday, 25 April 2010, 20:33 GMT
something like this yes, but some remarks:
- 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"
Comment by Thomas Dziedzic (tomd123) - Monday, 26 April 2010, 19:24 GMT
speaking with the people at #git it seems that the repo doesn't use annotated tags.

"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.
Comment by Thomas Dziedzic (tomd123) - Sunday, 16 May 2010, 05:30 GMT
decision?

Loading...