py-version.sh: Make it work in case no git tag is present.
This commit is contained in:
parent
6b344d7816
commit
22a0d67c0f
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
git_tag="$(git describe --dirty || echo unknown)"
|
||||
# Note: git describe doesn't work if no tag is available
|
||||
git_tag="$(git describe --dirty 2> /dev/null || git rev-parse --short HEAD)"
|
||||
git_hash="$(git rev-parse --short HEAD 2> /dev/null || echo unknown)"
|
||||
git_files_are_clean=1
|
||||
# Check if there are any modified files.
|
||||
|
Loading…
Reference in New Issue
Block a user