[libvirt PATCH v2 02/35] ci: build.sh: Add GIT_ROOT env helper variable

Erik Skultety posted 35 patches 1 year, 3 months ago
[libvirt PATCH v2 02/35] ci: build.sh: Add GIT_ROOT env helper variable
Posted by Erik Skultety 1 year, 3 months ago
We'll use this one in many of the job functions future patches will
introduce, it's a neat shortcut to avoid using relative paths.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Erik Skultety <eskultet@redhat.com>:
---
 ci/build.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ci/build.sh b/ci/build.sh
index 5a9298c4b4..0549b01ca0 100644
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -14,6 +14,8 @@ if ! [ -t 1 ]; then
     export VIR_TEST_DEBUG="1"
 fi
 
+GIT_ROOT="$(git rev-parse --show-toplevel)"
+
 # $MESON_OPTS is an env that can optionally be set in the container,
 # populated at build time from the Dockerfile. A typical use case would
 # be to pass options to trigger cross-compilation
-- 
2.41.0