Commit 3d9e4ece authored by Vitaly Lipatov's avatar Vitaly Lipatov

intro get_packager and use it in rpmlog

parent 98fa84a5
......@@ -110,6 +110,8 @@ CHANGELOG="`git log $FROMTAG..$TOTAG --reverse --simplify-merges --dense --prett
[ -n "$CHANGELOG" ] || fatal "git log was failed. Probably, you have no tag $FROMTAG in your repo. Check the source repository."
fi
[ -n "$(get_packager $SPECNAME)" ] || fatal "You need set packager in your spec (use $ rpmcs for it) or in ~/.rpmmacros file"
if [ -n "$TESTRUN" ] ; then
INCREMENTMODE=""
fi
......
......@@ -266,6 +266,12 @@ get_gear_name()
[ -n "$gn" ]
}
get_packager()
{
local packager=$($RPMBUILD --eval "%packager" "$1")
rhas "$packager" "packager" && fatal "Packager $packager is not defined correctly in spec $1 or in ~/.rpmmacros"
}
if [ "$UID" = "0" ] && [ -z "$ALLOW_ROOT_USER" ] ; then
fatal "It is strict recommended do not use these scripts as root"
......@@ -489,3 +495,4 @@ version_more_version()
{
[ "$2" = "$(echo -e "$1\n$2" | sort -n | head -n1)" ]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment