Commit d45efc1e authored by Vitaly Lipatov's avatar Vitaly Lipatov Committed by Vitaly Lipatov

rpmbs: support git.alt for -u at gear repo

parent a9357eea
......@@ -78,6 +78,48 @@ LISTRPMARGS=$@
}
# TODO: include in sisyphus_check
# , MENV
function release_check()
{
if [ "$MENV" = "SS" ] || [ "$MENV" = "DD" ] ; then
for i in $@ ; do
if [ -z "${i/*alt[0-9].M[0-9][0-9]*/}" ] ; then
#
fatal "Incorrect release in $i package: was prepared for Sisyphus"
fi
done
return
fi
for i in $@ ; do
if [ -n "${i/*alt[0-9].$MENV*/}" ] ; then
#
fatal "Incorrect release in $i package: was prepared for $MENV"
fi
done
}
# create tag according to package release
check_gear_and_tag()
{
local SPECDIR=$1
local GEARCTAG=gear-create-tag
# set SPECDIR from LISTNAMES if empty
if [ -r "$LISTNAMES" ] ; then
[ -n "$SPECDIR" ] || SPECDIR=`dirname $LISTNAMES`
fi
if is_gear $SPECDIR ; then
# needed correct user.name/user.email for get GPG id
pushd $SPECDIR
$GEARCTAG --force
popd >/dev/null
# git push ?
fi
}
parse_cmd_pre "$@"
# quotes brokes option handling
mygetopts $LISTARGS
......@@ -96,6 +138,26 @@ fi
#LISTRPMARGS=
#LISTRPMARGS=${LISTRPMARGS/-m/}
#echo "@@ - $LISTRPMARGS - '$MENV'"
# set SPECDIR from LISTNAMES if empty
if [ -r "$LISTNAMES" ] ; then
[ -n "$SPECDIR" ] || SPECDIR=`dirname $LISTNAMES`
fi
# If we build from gear repo, run task
if [ -n "$UPLOADNOW" ] && is_gear $SPECDIR ; then
echo "Run with gear repo..."
build_rpms_name "$LISTNAMES"
release_check
check_gear_and_tag
$ETERBUILDBIN/gpush || fatal "Git push failed. Possibly you need to run ginit for create remote repo."
TAG=$VERSION-$RELEASE
ssh git.alt task new
ssh git.alt task add repo $BASENAME $TAG || ssh git.alt task rm
ssh git.alt task run
exit
fi
pack_src_rpm ${LISTRPMARGS}
#LISTARGS=${LISTARGS/-s/}
......@@ -115,26 +177,6 @@ if [ -n "$REMOTEBUILD" ] ; then
exit 0
fi
# TODO: include in sisyphus_check
# , MENV
function release_check()
{
if [ "$MENV" = "SS" ] || [ "$MENV" = "DD" ] ; then
for i in $@ ; do
if [ -z "${i/*alt[0-9].M[0-9][0-9]*/}" ] ; then
#
fatal "Incorrect release in $i package: was prepared for Sisyphus"
fi
done
return
fi
for i in $@ ; do
if [ -n "${i/*alt[0-9].$MENV*/}" ] ; then
#
fatal "Incorrect release in $i package: was prepared for $MENV"
fi
done
}
#set_incoming $MENV
set_binaryrepo $MENV
......@@ -153,25 +195,6 @@ if [ -n "${DELETENOW}" ]; then
exit 0
fi
# create tag according to package release
check_gear_and_tag()
{
local SPECDIR=$1
local GEARCTAG=gear-create-tag
# set SPECDIR from LISTNAMES if empty
if [ -r "$LISTNAMES" ] ; then
[ -n "$SPECDIR" ] || SPECDIR=`dirname $LISTNAMES`
fi
if is_gear $SPECDIR ; then
# needed correct user.name/user.email for get GPG id
pushd $SPECDIR
$GEARCTAG --force
popd >/dev/null
# git push ?
fi
}
if [ -n "$SIGN" ]; then
release_check $LISTBUILT
......
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