proto: Consider lightweight Git tags when determining the version number
By default, `git describe` only uses annotated tags. However, most projects use non-annotated or "lightweight" tags instead of annotated ones. Include the --tags flag in the example to consider all tag types. Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
This commit is contained in:
parent
4c93e63ddf
commit
213237dd3a
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ pkgver() {
|
||||||
printf "r%s" "$(bzr revno)"
|
printf "r%s" "$(bzr revno)"
|
||||||
|
|
||||||
# Git, tags available
|
# Git, tags available
|
||||||
printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
|
printf "%s" "$(git describe --tags --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
|
||||||
|
|
||||||
# Git, no tags available
|
# Git, no tags available
|
||||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||||
|
|
Loading…
Add table
Reference in a new issue