Get only the precise tag number when getting local version, do not show branch name when on master branch(es)

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner
2022-11-14 20:39:34 +00:00
parent ca04c13315
commit cdbe4c9b86
2 changed files with 15 additions and 6 deletions

View File

@@ -17,7 +17,7 @@ function get_local_branch() {
function get_local_version() {
# Return active version
cd "${1}" 2> /dev/null || return 1
git describe --long --dirty --tags 2> /dev/null || return 1
git describe --tags --always 2> /dev/null || return 1
}
function get_local_hash() {