mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-22 10:10:54 +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'* )
|
*[Cc]'annot describe'* )
|
||||||
if [ -n "$default_tag" ]; then
|
if [ -n "$default_tag" ]; then
|
||||||
commit=$(git rev-list --abbrev-commit --max-count 1 HEAD)
|
commit=$(git rev-list --abbrev-commit --max-count 1 HEAD)
|
||||||
count=$(git rev-list HEAD | wc -l)
|
count=$(( $(git rev-list HEAD | wc -l) - 1 ))
|
||||||
count=$((count-1))
|
echo "$default_tag-$count-g$commit$dirty"
|
||||||
version="$default_tag-$count-g$commit"
|
|
||||||
[ $(git status --short --untracked-files=normal | wc -l) -ne 0 ] && version="$version$dirty"
|
|
||||||
echo "$version"
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user