From: Ben Crocker <bcrocker@xxxxxxxxxx> Map returned version: vV.P-rcN-... => vV.P-rcN vV.P-N-hash => (same) Signed-off-by: Ben Crocker <bcrocker@xxxxxxxxxx> --- redhat/self-test/egit.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/redhat/self-test/egit.sh b/redhat/self-test/egit.sh index b998f868a314..068d486e4993 100755 --- a/redhat/self-test/egit.sh +++ b/redhat/self-test/egit.sh @@ -7,10 +7,22 @@ case $arg in if [ -n "$EGIT_OVERRIDE_DESCRIBE" ] then # Should be a version, e.g. v5.9-rc8 or v5.9-rc7-1449-g57b6fb86b0ac - echo "$EGIT_OVERRIDE_DESCRIBE" + version="$EGIT_OVERRIDE_DESCRIBE" else - git describe "$@" + version=$(git describe "$@") fi + va=(${version//-/ }) + v=${va[0]} + r=${va[1]} + if [ "${r/rc/}" != "${r}" ] # Quotes are crucial here + then + # vV.P-rcN-stuff => vV.P-rcN + v="$v-$r" + else + # Keep vV.P-N-hash + v="$version" + fi + echo "$v" ;; merge-base ) if [ -n "$EGIT_OVERRIDE_MERGE_BASE" ] -- GitLab _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx