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

move release_check to functions/alt

parent 4565e14c
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
# load common functions, compatible with local and installed script # load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common . `dirname $0`/../share/eterbuild/functions/common
load_mod rpm tarball load_mod rpm tarball alt
SIGN= SIGN=
UPLOADNOW= UPLOADNOW=
...@@ -80,27 +80,6 @@ LISTRPMARGS=$@ ...@@ -80,27 +80,6 @@ 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 # create tag according to package release
check_gear_and_tag() check_gear_and_tag()
{ {
...@@ -182,7 +161,7 @@ fi ...@@ -182,7 +161,7 @@ fi
if [ -n "$UPLOADNOW" ] && is_gear $SPECDIR ; then if [ -n "$UPLOADNOW" ] && is_gear $SPECDIR ; then
echo "Run with gear repo..." echo "Run with gear repo..."
build_rpms_name "$LISTNAMES" build_rpms_name "$LISTNAMES"
release_check pkg_release_check
check_gear_and_tag check_gear_and_tag
$ETERBUILDBIN/gpush $BASENAME || fatal "Git push via gpush failed. Possibly you need to run ginit for create remote repo." $ETERBUILDBIN/gpush $BASENAME || fatal "Git push via gpush failed. Possibly you need to run ginit for create remote repo."
TAG=$VERSION-$RELEASE TAG=$VERSION-$RELEASE
...@@ -243,7 +222,7 @@ if [ -z "$SIGN" ]; then ...@@ -243,7 +222,7 @@ if [ -z "$SIGN" ]; then
fi fi
# Sign src.rpm and upload it # Sign src.rpm and upload it
release_check $LISTBUILT pkg_release_check $LISTBUILT
if [ -r "$LISTBUILT" ] ; then if [ -r "$LISTBUILT" ] ; then
check_gear_and_tag check_gear_and_tag
......
...@@ -223,7 +223,7 @@ test -z "$LISTARGS" && fatal "Please run with spec/package name" ...@@ -223,7 +223,7 @@ test -z "$LISTARGS" && fatal "Please run with spec/package name"
if [ -n "$INSTALLBINARY" ] ; then if [ -n "$INSTALLBINARY" ] ; then
parse_cmd_pre "$@" parse_cmd_pre "$@"
pack_src_rpm $LISTRPMARGS pack_src_rpm $LISTRPMARGS
echog "Running apt-get for install needed packages for $LISTBUILT" echog "Running apt-get build-dep for install needed packages for $LISTBUILT"
# FIXME: ALT Specific # FIXME: ALT Specific
$SUDO apt-get build-dep $LISTBUILT $SUDO apt-get build-dep $LISTBUILT
exit 0 exit 0
......
...@@ -79,3 +79,27 @@ get_altdistr_mod() ...@@ -79,3 +79,27 @@ get_altdistr_mod()
{ {
echo "$1" | sed -e "s|\([0-9]\)\.\([0-9]\)|M\1\2|g" | sed -e "s|Sisyphus|SS|g" echo "$1" | sed -e "s|\([0-9]\)\.\([0-9]\)|M\1\2|g" | sed -e "s|Sisyphus|SS|g"
} }
# TODO: include in sisyphus_check
# , MENV
function pkg_release_check()
{
local STREL=alt
[ -z "$KORINFTARGETRELEASE" ] || STREL=$KORINFTARGETRELEASE
if [ "$MENV" = "SS" ] || [ "$MENV" = "DD" ] ; then
for i in $@ ; do
if [ -z "${i/*$STREL[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/*$STREL[0-9].$MENV*/}" ] ; then
#
fatal "Incorrect release in $i package: was prepared for $MENV"
fi
done
}
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