mirror of
https://codeberg.org/dwl/dwl.git
synced 2024-12-26 11:16:30 +00:00
use git describe
to generate version
This commit is contained in:
parent
662e06e68e
commit
620fd9dc56
2 changed files with 1 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
||||||
_VERSION = 0.3.1
|
_VERSION = 0.3.1
|
||||||
VERSION = `./generate-version.sh $(_VERSION)`
|
VERSION = `git describe --long --tags --dirty 2>/dev/null || echo $(_VERSION)`
|
||||||
|
|
||||||
# paths
|
# paths
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
|
|
|
@ -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
|
|
Loading…
Reference in a new issue