Fix version string with git describe --tags
This commit is contained in:
parent
2e1eb04403
commit
1ed0f4a2f9
1 changed files with 1 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
||||||
VERSION=$(git describe 2>/dev/null || git rev-parse --short HEAD || echo "v0.0.0-unknown")
|
VERSION=$(git describe --tags 2>/dev/null || git rev-parse --short HEAD || echo "v0.0.0-unknown")
|
||||||
DIRTY=$(git diff-index --quiet HEAD -- || echo "-dirty")
|
DIRTY=$(git diff-index --quiet HEAD -- || echo "-dirty")
|
||||||
FULL_VERSION="${VERSION}${DIRTY}"
|
FULL_VERSION="${VERSION}${DIRTY}"
|
||||||
echo "$FULL_VERSION"
|
echo "$FULL_VERSION"
|
||||||
|
|
Loading…
Add table
Reference in a new issue