Commit 2ae701b1 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmbs: add support -e (build --test-only)

parent 6f2507b2
...@@ -25,6 +25,7 @@ SIGNTAG= ...@@ -25,6 +25,7 @@ SIGNTAG=
FORCE= FORCE=
UPLOADNOW= UPLOADNOW=
CHECKONLY= CHECKONLY=
TESTONLY=
NOSOURCE= NOSOURCE=
NOCHECK= NOCHECK=
UPDATES= UPDATES=
...@@ -34,7 +35,7 @@ PREPARETASK= ...@@ -34,7 +35,7 @@ PREPARETASK=
TASKNUMBER= TASKNUMBER=
############################# #############################
Usage="Usage: $name [GIRAR] [-b REPONAME] [-p POCKET] [-s|-t|-u|-a|-A|-c] [-o -z -n -p --nodeps] [-k [TARGETDIR]] [spec or src.rpm]..." Usage="Usage: $name [GIRAR] [-b REPONAME] [-p POCKET] [-s|-t|-u|-a|-A|-c|-e] [-o -z -n -p --nodeps] [-k [TARGETDIR]] [spec or src.rpm]..."
function mygetopts() function mygetopts()
{ {
name=${0##*/} name=${0##*/}
...@@ -46,7 +47,7 @@ phelp() ...@@ -46,7 +47,7 @@ phelp()
echog "$Usage" echog "$Usage"
echo echo
echog "Options:" echog "Options:"
echog " -u sign and run gear build task after build" echog " -u sign and run gear build task"
echog " -a TASK sign package(s)/repo, push/upload it and add to (shared) task TASK" echog " -a TASK sign package(s)/repo, push/upload it and add to (shared) task TASK"
echog " -a TASKbeforeSUBTASK (f.i., 43122before90) for put task before SUBTASK in TASK" echog " -a TASKbeforeSUBTASK (f.i., 43122before90) for put task before SUBTASK in TASK"
echog " -A sign package(s)/repo, push/upload it and add to the last task" echog " -A sign package(s)/repo, push/upload it and add to the last task"
...@@ -57,6 +58,7 @@ phelp() ...@@ -57,6 +58,7 @@ phelp()
#echog " -k [TARGET] - generate src.rpm and publish to TARGET dir (from Source: by default)" #echog " -k [TARGET] - generate src.rpm and publish to TARGET dir (from Source: by default)"
#echog " -r [RELEASE] - publish to RELEASE target dir version" #echog " -r [RELEASE] - publish to RELEASE target dir version"
echog "Ext. options:" echog "Ext. options:"
echog " -e sigan and run gear test only task girar build"
echog " -c only sign package(s) with checking" echog " -c only sign package(s) with checking"
echog " -f force operation (overwrite tag)" echog " -f force operation (overwrite tag)"
echog " -s sign package(s) (and move it to dir ETERDESTSRPM if defined)" echog " -s sign package(s) (and move it to dir ETERDESTSRPM if defined)"
...@@ -67,11 +69,12 @@ phelp() ...@@ -67,11 +69,12 @@ phelp()
# echog " -d - remove package(s) from SRPMS and Incoming" # echog " -d - remove package(s) from SRPMS and Incoming"
} }
while getopts :hfstcudnop:a:Ab:z opt; do while getopts :hfstcudenop:a:Ab:z opt; do
case $opt in case $opt in
h) phelp; exit 0;; h) phelp; exit 0;;
s) SIGN=1 ;; s) SIGN=1 ;;
t) SIGNTAG=1 ;; t) SIGNTAG=1 ;;
e) TESTONLY="--test-only" ; UPLOADNOW=1 ; SIGN=1 ;;
f) FORCE="-f" ;; f) FORCE="-f" ;;
# FIXME: handle SIGN separately # FIXME: handle SIGN separately
c) CHECKONLY=1 ; SIGN=1 ;; c) CHECKONLY=1 ; SIGN=1 ;;
...@@ -318,7 +321,7 @@ if [ -n "$UPLOADNOW" ] && is_gear $SPECDIR ; then ...@@ -318,7 +321,7 @@ if [ -n "$UPLOADNOW" ] && is_gear $SPECDIR ; then
fi fi
docmd ssh $GEARHOST task add $TASKNUMBER repo $PROJECTNAME $TAG 2>&1 | tee $RPMDIR/uploaded.log.tmp docmd ssh $GEARHOST task add $TASKNUMBER repo $PROJECTNAME $TAG 2>&1 | tee $RPMDIR/uploaded.log.tmp
else else
docmd ssh $GEARHOST build $(usearg -b $BINARYREPO sisyphus) $(usearg -p $POCKET) $PROJECTNAME $TAG 2>&1 | tee $RPMDIR/uploaded.log.tmp docmd ssh $GEARHOST build $TESTONLY $(usearg -b $BINARYREPO sisyphus) $(usearg -p $POCKET) $PROJECTNAME $TAG 2>&1 | tee $RPMDIR/uploaded.log.tmp
fi fi
checkout_original_branch checkout_original_branch
......
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