mirror of https://github.com/isamert/scli.git
Remove %h from the VERSION file
git %(describe) is all we need.
This commit is contained in:
parent
5ba0e32486
commit
57fc759b9c
2
VERSION
2
VERSION
|
@ -1,4 +1,4 @@
|
|||
$Format:%h %(describe:match=v*)$
|
||||
$Format:%(describe:match=v*)$
|
||||
|
||||
|
||||
# The format string above is expanded with values during the execution of
|
||||
|
|
7
scli
7
scli
|
@ -140,10 +140,11 @@ def get_version():
|
|||
version_str = f.readline()
|
||||
except OSError:
|
||||
return '?'
|
||||
if version_str.startswith('$'):
|
||||
# Neither a release, nor is there a `.git` dir (e.g. manually dl'ed blob)
|
||||
if not version_str.startswith('v'):
|
||||
# '$Format:...' - not a `git archive` (e.g. a manually dl'ed blob)
|
||||
# '%(..)' - `git archive` if git < 2.32
|
||||
return '?'
|
||||
return version_str.split()[-1] # tag or commit hash
|
||||
return version_str[1:] # `git-describe`-like string
|
||||
|
||||
|
||||
def get_default_editor():
|
||||
|
|
Loading…
Reference in New Issue