[COPR] Restore dist in Release

This is to fix:
WARNING: No disttag found in prebuilt packages
INFO: Use --define DISTTAG to set proper dist. e. g. --define DISTTAG fc21.
ERROR: 'No disttag in package and no DISTTAG flag. Use --define DISTTAG to set proper dist e. g., --define DISTTAG=fc21.' (logs in /var/lib/copr-rpmbuild/workspace/workdir-wgba9jrq/.cache/fedora-review.log)

Also adding option to git_commint_no suppressing new line prevents
breaking line in Release tag.

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
This commit is contained in:
Przemo Firszt
2021-08-27 16:11:56 +01:00
parent 28c51d6f39
commit 02769019bc
2 changed files with 2 additions and 2 deletions

View File

@@ -32,7 +32,7 @@
Name: %{name}
Epoch: 1
Version: 0.19
Release: pre_{{{ git_commit_no }}}
Release: pre_{{{git_commit_no}}}%{?dist}
Summary: A general purpose 3D CAD modeler
Group: Applications/Engineering

View File

@@ -1,4 +1,4 @@
function git_commit_no {
commits=$(curl -s 'https://api.github.com/repos/FreeCAD/FreeCAD/compare/120ca87015...master' | grep "ahead_by" | sed -s 's/ //g' | sed -s 's/"ahead_by"://' | sed -s 's/,//')
echo $((commits + 1))
echo -n $((commits + 1))
}