Version: use git tag if available
This commit is contained in:
parent
ce9d0dc8a0
commit
c8c2b2db2a
1 changed files with 4 additions and 0 deletions
|
@ -1,5 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
tag="$(git describe --tags --exact-match 2>/dev/null)"
|
||||||
|
if [ "$?" -eq 0 ] ; then
|
||||||
|
echo -n "$tag-"
|
||||||
|
fi
|
||||||
echo -n "$(git rev-parse --short HEAD)"
|
echo -n "$(git rev-parse --short HEAD)"
|
||||||
if [ -n "$(git status --porcelain --untracked-files=no)" ] ; then
|
if [ -n "$(git status --porcelain --untracked-files=no)" ] ; then
|
||||||
echo -n "-dirty"
|
echo -n "-dirty"
|
||||||
|
|
Loading…
Add table
Reference in a new issue