1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
From: =?utf-8?b?IkNoYW5nWmh1byBDaGVuICjpmbPmmIzlgKwpIg==?=
<czchen@debian.org>
Date: Mon, 9 Jun 2025 09:11:06 +0800
Subject: Use dpkg-parsechangelog to get build version
---
scripts/version | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/scripts/version b/scripts/version
index f24a18d..41c1947 100755
--- a/scripts/version
+++ b/scripts/version
@@ -1,13 +1,2 @@
#!/bin/sh
-set -eu
-
-cd "$(dirname "$0")/../"
-test -e .git || exit 1
-
-if git describe --tags --match 'jq-*' >/dev/null 2>&1; then
- git describe --tags --match 'jq-*' --dirty | sed 's/^jq-//'
-else
- branch=$(git rev-parse --abbrev-ref HEAD)
- commit=$(git describe --always --dirty)
- echo "${branch}-${commit}"
-fi
+dpkg-parsechangelog --show-field Version | cut --delimiter='-' --field=1
|