From: Erik Skultety Date: Thu, 24 Aug 2023 13:47:48 +0000 (+0200) Subject: ci: build.sh: Add a helper function to create the dist tarball X-Git-Tag: v9.8.0-rc1~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=387553db480309855a8c69d6e5ea9e0c3f0bed46;p=thirdparty%2Flibvirt.git ci: build.sh: Add a helper function to create the dist tarball 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 Reviewed-by: Daniel P. Berrangé --- diff --git a/ci/build.sh b/ci/build.sh index 8e8f0c702d..0c2385ee32 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -42,3 +42,13 @@ run_build() { test -f $GIT_ROOT/build/build.ninja || run_meson_setup run_cmd meson compile -C build $BUILD_ARGS } + +run_dist() { + test -f $GIT_ROOT/build/build.ninja || 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 meson dist -C build --no-tests +}