From 7261a0540a52b64918da48df68a6efabb56bdd93 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Fri, 28 Feb 2020 18:07:12 +0100 Subject: [PATCH] github: fetch git tags before testing GitHub workflows fetch a clone of the dracut repository which doesn't contain git tags, thus "breaking" the RPM build in certain situations i.e.: DRACUT_MAIN_VERSION in Makefile is defined as an output of `git describe`, which in full git clone returns a tag with a numeric version. However, without tags it returns SHA of the last commit, which later propagates into `Provides:` attribute of the built RPM and can break dependency tree when installed --- fedora-test-github.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fedora-test-github.sh b/fedora-test-github.sh index acd6f67ca..283e89562 100755 --- a/fedora-test-github.sh +++ b/fedora-test-github.sh @@ -7,6 +7,16 @@ set -ex RUN_ID="$1" TESTS=$2 +# GitHub workflows fetch a clone of the dracut repository which doesn't +# contain git tags, thus "breaking" the RPM build in certain situations +# i.e.: +# DRACUT_MAIN_VERSION in Makefile is defined as an output of `git describe`, +# which in full git clone returns a tag with a numeric version. However, +# without tags it returns SHA of the last commit, which later propagates into +# `Provides:` attribute of the built RPM and can break dependency tree when +# installed +[[ -d .git ]] && git fetch --tags && git describe --tags + ./configure NCPU=$(getconf _NPROCESSORS_ONLN) -- 2.39.2