We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 529e1b7 commit 23e2eecCopy full SHA for 23e2eec
1 file changed
debian/rules
@@ -9,7 +9,8 @@ VENDOR_DIR = $(CURDIR)/vendor
9
USE_OFFLINE = $(shell test -d $(VENDOR_DIR) && echo "--offline")
10
11
# Extract version from Cargo.toml
12
-VERSION = $(shell grep -m 1 '^version =' Cargo.toml | sed 's/version = "//' | sed 's/"//')
+# Use awk to find version under [workspace.package] section
13
+VERSION = $(shell awk '/\[workspace\.package\]/{f=1} f && /^version = \"/{gsub(/[^0-9.]/, "", $$3); print $$3; exit}' Cargo.toml)
14
15
%:
16
dh $@
0 commit comments