From: Fabian Grünbichler Date: Wed, 4 Jan 2023 14:13:09 +0000 (+0100) Subject: build: inject repoid into build environment X-Git-Tag: v3.0.1~56 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=6213ca1e212c28afa5175e961b6f65fb41c73dae;p=proxmox-backup.git build: inject repoid into build environment to support building outside of the git tree, e.g. via sbuild. Signed-off-by: Fabian Grünbichler --- diff --git a/Makefile b/Makefile index 1d04eb65..e8a541a3 100644 --- a/Makefile +++ b/Makefile @@ -89,6 +89,7 @@ doc: build: rm -rf build mkdir build + git rev-parse HEAD > build/.repoid cp -a debian \ Cargo.toml src \ $(SUBCRATES) \ diff --git a/debian/rules b/debian/rules index cf94692e..ff85b241 100755 --- a/debian/rules +++ b/debian/rules @@ -17,6 +17,10 @@ export CARGO_HOME = $(CURDIR)/debian/cargo_home export DEB_CARGO_CRATE=proxmox-backup_$(DEB_VERSION_UPSTREAM) export DEB_CARGO_PACKAGE=proxmox-backup +ifneq ("$(wildcard .repoid)","") + export REPOID=$(shell cat .repoid) +endif + %: dh $@ --with=bash-completion