mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-21 09:51:50 +00:00
fixes and improvements to handling of git repo with no tags on branch.
This commit is contained in:
parent
e9e0a1b4a4
commit
22258b60c0
@ -115,14 +115,11 @@ if [ -n "$dirty" ] && ! $allow_modified; then
|
||||
fi
|
||||
|
||||
# Use the "git describe" command to form the version string and append $dirty.
|
||||
extragitflags=
|
||||
set +e
|
||||
error=`git describe --match="$version_tag_glob" 2>&1 1>/dev/null`
|
||||
desc=`git describe --match="$version_tag_glob" 2>/dev/null`
|
||||
set -e
|
||||
# This ugly construction is required for use on machines with bash version 3.
|
||||
error="$(git describe --match="$version_tag_glob" 2>&1 1>/dev/null)" || true
|
||||
|
||||
if [ "x$error" == "x" ]; then
|
||||
echo $desc$dirty
|
||||
if [ -z "$error" ]; then
|
||||
echo "$(git describe --match="$version_tag_glob")"$dirty
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user