fdroid --version for installed releases and running from git

This will report the version embedded in the module if it is installed, and
will report `git describe` if being run from git.  If someone installs from
git using pip, this will probably report the version in setup.py, which
will be wrong.  But that is not a documented install method, and I haven't
heard of anyone using it.  The recommended way is to run straight from git.
This commit is contained in:
Hans-Christoph Steiner 2015-09-01 11:23:23 +02:00
parent 4a4bb3e7a5
commit 3fc2a99d71
3 changed files with 37 additions and 5 deletions

View file

@ -84,10 +84,10 @@ __vercode() {
__complete_options() {
case "${cur}" in
--*)
COMPREPLY=( $( compgen -W "--help ${lopts}" -- $cur ) )
COMPREPLY=( $( compgen -W "--help --version ${lopts}" -- $cur ) )
return 0;;
*)
COMPREPLY=( $( compgen -W "-h ${opts} --help ${lopts}" -- $cur ) )
COMPREPLY=( $( compgen -W "-h ${opts} --help --version ${lopts}" -- $cur ) )
return 0;;
esac
}