git tags may be behind the .spec file during development, so favor the .spec file as in commit c0b43df28a982747 (src/Makefile: use VERSION variable consistently, 2021-11-15). This brings us one step closer to being able to build Debian packages without git. Signed-off-by: Eric Wong <e@xxxxxxxxx> --- Makefile | 5 ++++- make-debs.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 28c0fd8..48fb48a 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,10 @@ all: @$(MAKE) -C test @$(MAKE) -C examples -.PHONY: all install default clean test +print-version: + @echo $(VERSION) + +.PHONY: all install default clean test print-version .PHONY: FORCE cscope partcheck: all diff --git a/make-debs.sh b/make-debs.sh index aea05f0..0913c47 100755 --- a/make-debs.sh +++ b/make-debs.sh @@ -32,7 +32,7 @@ src_dir=$(readlink -e `basename $0`) liburing_dir=$(dirname $src_dir) basename=$(basename $liburing_dir) dirname=$(dirname $liburing_dir) -version=$(git describe --match "lib*" | cut -d '-' -f 2) +version=$(make print-version | tail -n1) outfile="liburing-$version" orgfile=$(echo $outfile | tr '-' '_')