This helper function does not correspond to a particular GitLab job, it
just logically separates the necessary step of creating a dist tarball
from the RPM build job that takes over.
One notable change here is the need to update git's file index which
causes issues in local container executions which rely on a shallow
copy of the libvirt repo created as:
$ git clone --local
Even if all changes have been committed, git often complained
otherwise. Updating the index in a GitLab environment is a NOP.
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
ci/build.sh | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/ci/build.sh b/ci/build.sh
index c2f54707ce..c56e45f51f 100644
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -54,3 +54,15 @@ run_build() {
run_meson_setup
run_cmd "$CMD"
}
+
+run_dist() {
+ local CMD="meson dist -C build --no-tests"
+
+ run_meson_setup
+
+ # dist is unhappy in local container environment complaining about
+ # uncommitted changes in the repo which is often not the case - refreshing
+ # git's index solves the problem
+ git update-index --refresh
+ run_cmd "$CMD"
+}
--
2.41.0