summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.mk2
-rwxr-xr-xgenerate-version.sh13
2 files changed, 1 insertions, 14 deletions
diff --git a/config.mk b/config.mk
index ba24bb8..4638d5f 100644
--- a/config.mk
+++ b/config.mk
@@ -1,5 +1,5 @@
_VERSION = 0.3.1
-VERSION = `./generate-version.sh $(_VERSION)`
+VERSION = `git describe --long --tags --dirty 2>/dev/null || echo $(_VERSION)`
# paths
PREFIX = /usr/local
diff --git a/generate-version.sh b/generate-version.sh
deleted file mode 100755
index cf408e1..0000000
--- a/generate-version.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-if git tag --contains HEAD | grep -q $1; then
- echo $1
-else
- branch="$(git rev-parse --abbrev-ref HEAD)"
- commit="$(git rev-parse --short HEAD)"
- if [ "${branch}" != "main" ]; then
- echo $1-$branch-$commit
- else
- echo $1-$commit
- fi
-fi