proto: Strip initial "v" from Git tag names
Many projects use tags that are the version number prefixed with "v". In particular, GitHub suggests and encourages this naming convention. Include code in the example to remove the "v" so that the VCS package version number is comparable to the regular package version number. Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
This commit is contained in:
parent
213237dd3a
commit
7c60bd841a
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ pkgver() {
|
|||
printf "r%s" "$(bzr revno)"
|
||||
|
||||
# Git, tags available
|
||||
printf "%s" "$(git describe --tags --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
|
||||
printf "%s" "$(git describe --tags --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g;s/^v//')"
|
||||
|
||||
# Git, no tags available
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
|
|
Loading…
Add table
Reference in a new issue