Commit d30e3d25 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmrb, rpmbsh: add -a TASK, -A, -f options

- rpmrb: add -a TASK to add to existing task after build - rpmrb: add -A to add to the last task after build - rpmrb: add -f for force tag overwrite - rpmbsh: add -a TASK and -A options, pass them to rpmbs
parent 29e390b3
......@@ -16,7 +16,7 @@ REMCOM=
COMMIT=
#############################
Usage="Usage: $name [GIRAR] [-s -u -m -i -c -e ] [-b REPONAME] [-f] [spec or src.rpm]..."
Usage="Usage: $name [GIRAR] [-s -u -a TASK -A -i -c -e ] [-b REPONAME] [-f] [spec or src.rpm]..."
function mygetopts()
{
name=${0##*/}
......@@ -29,6 +29,8 @@ phelp()
echo
echog "Options:"
echog " -u sign and run gear build task after build"
echog " -a TASK sign and add to existing (shared) task TASK after build"
echog " -A sign and add to the last task after build"
echog " -i install built packages in test hasher (via loginhsh -t)"
echog " -f force tag set (see rpmbs --help)"
echo "$HELP_GIRAR"
......@@ -44,11 +46,14 @@ phelp()
}
PASSEDARGS=
while getopts :hieufclstwb: opt; do
TASKARG=
while getopts :hieufclstwb:a:A opt; do
case $opt in
h) phelp; exit 0;;
t) COMMIT="--commit" ;;
u|f|c|e|s|l) PASSEDARGS="$PASSEDARGS -$opt" ;;
A) TASKARG="-A" ;;
a) TASKARG="-a $OPTARG" ;;
w) THOROUGH="-a" ;;
i) INSTALLPKG=1 ;;
b) BINARYREPONAME=$OPTARG ;;
......@@ -141,5 +146,5 @@ else
TSKLIST="$LISTBUILT"
fi
docmd $ETERBUILDBIN/rpmbs $GIRARHOST -b $BINARYREPO $RPMBSARGS $TSKLIST
docmd $ETERBUILDBIN/rpmbs $GIRARHOST -b $BINARYREPO $TASKARG $RPMBSARGS $TSKLIST
......@@ -13,44 +13,53 @@ load_mod spec git
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echog "rpmrb (Re Build) - update spec to vermajor.verminor version, build %rel release"
echog "Usage: rpmrb [GIRAR] [-n] [spec] [vermajor][.verminor] [rel]"
echog " -n - skip install built package in hasher for testing purposes"
echog "Usage: rpmrb [GIRAR] [-n] [-f] [-a TASK | -A] [spec] [vermajor][.verminor] [rel]"
echog " -n - skip install built package in hasher for testing purposes"
echog " -f - force tag overwrite"
echog " -a TASK - add to existing (shared) task TASK after build"
echog " -A - add to the last task after build"
echo "$HELP_GIRAR"
echog "Example:"
echog " $ rpmrb [name.spec] 22.6 alt2"
echog " $ rpmrb 1.2.3"
echog " $ rpmrb -A 1.2.3"
exit 0
fi
INSTALLINHASHER='-i'
UPLOADARG='-u'
FORCEARG=
parse_r()
{
case "$1" in
-n)
INSTALLINHASHER=''
shift
;;
-*)
fatal "Unsupported option "$1". See --help."
;;
*)
esac
while [ -n "$1" ] ; do
case "$1" in
-n)
INSTALLINHASHER=''
shift
;;
-f)
FORCEARG='-f'
shift
;;
-a)
UPLOADARG="-a $2"
shift 2
;;
-A)
UPLOADARG='-A'
shift
;;
-*)
fatal "Unsupported option $1. See --help."
;;
*)
break
;;
esac
done
VER="$1"
case "$2" in
-n)
INSTALLINHASHER=''
shift
;;
-*)
fatal "Unsupported option "$2". See --help."
;;
*)
esac
# need for rpmgs
GSSETRELEASE="$2"
}
......@@ -87,4 +96,4 @@ for SPEC in $LISTNAMES ; do
cd - >/dev/null
done
docmd $ETERBUILDBIN/rpmbsh $GIRARHOST $INSTALLINHASHER -u $LISTNAMES
docmd $ETERBUILDBIN/rpmbsh $GIRARHOST $INSTALLINHASHER $FORCEARG $UPLOADARG $LISTNAMES
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