mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-22 02:06:42 +00:00
Fix version_string.sh script
Fix logic for appending dirty suffix to synthetic version string (only used when no tags present, ie "git describe" fails).
This commit is contained in:
parent
2e211a62d5
commit
c7eb5776f9
@ -122,11 +122,8 @@ case "$error" in
|
||||
*[Cc]'annot describe'* )
|
||||
if [ -n "$default_tag" ]; then
|
||||
commit=$(git rev-list --abbrev-commit --max-count 1 HEAD)
|
||||
count=$(git rev-list HEAD | wc -l)
|
||||
count=$((count-1))
|
||||
version="$default_tag-$count-g$commit"
|
||||
[ $(git status --short --untracked-files=normal | wc -l) -ne 0 ] && version="$version$dirty"
|
||||
echo "$version"
|
||||
count=$(( $(git rev-list HEAD | wc -l) - 1 ))
|
||||
echo "$default_tag-$count-g$commit$dirty"
|
||||
exit 0
|
||||
fi
|
||||
;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user