mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-23 18:58:29 +03:00
Make compute-version.py return 0.0.0-commit as fallback
This commit is contained in:
parent
b53412ad03
commit
646f52e89d
@ -35,6 +35,7 @@ def compute_version(tag_prefix=None):
|
||||
['git', 'describe',
|
||||
'--tags',
|
||||
'--dirty=-dirty',
|
||||
'--always',
|
||||
] + (
|
||||
['--match=%s*' % tag_prefix] if tag_prefix else []
|
||||
),
|
||||
@ -72,6 +73,12 @@ def compute_version(tag_prefix=None):
|
||||
git_version
|
||||
)
|
||||
|
||||
# If version is raw abbreviated commit ID, prepend '0.0.0-'
|
||||
git_version = re.sub(
|
||||
r'^([0-9a-f]{7}(-dirty)?)$', r'0.0.0-\1',
|
||||
git_version
|
||||
)
|
||||
|
||||
return git_version
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user