mirror of
https://github.com/speed47/spectre-meltdown-checker.git
synced 2026-04-03 13:47:08 +02:00
enh: rework VERSION adjust when we're cloned
This commit is contained in:
@@ -46,6 +46,6 @@ exit_cleanup() {
|
|||||||
|
|
||||||
# if we were git clone'd, adjust VERSION
|
# if we were git clone'd, adjust VERSION
|
||||||
if [ -d "$(dirname "$0")/.git" ] && command -v git >/dev/null 2>&1; then
|
if [ -d "$(dirname "$0")/.git" ] && command -v git >/dev/null 2>&1; then
|
||||||
g_describe=$(git -C "$(dirname "$0")" describe --tags --dirty 2>/dev/null)
|
g_commit=$(git -C "$(dirname "$0")" describe --always --dirty --abbrev=7 --match=- 2>/dev/null)
|
||||||
[ -n "$g_describe" ] && VERSION=$(echo "$g_describe" | sed -e s/^v//)
|
[ -n "$g_commit" ] && VERSION="$VERSION-git$g_commit"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user