Commit e3ef6e16 authored by Vitaly Lipatov's avatar Vitaly Lipatov

gitask: add get last [task], use it in rpmbs

parent a9d7a34a
...@@ -29,6 +29,10 @@ if [ "$1" = "get" ] ; then ...@@ -29,6 +29,10 @@ if [ "$1" = "get" ] ; then
#" #"
echo "$SUBTASK" echo "$SUBTASK"
exit exit
elif [ "$1 $2 $3" = "get last " ] || [ "$1 $2 $3" = "get last task" ] ; then
TASK="$(ssh $GEARHOST task ls | head -n1 | sed -e "s|^#\([0-9]*\) .*|\1|g")" || fatal
echo "$TASK"
exit
else else
fatal "Unknown command $1 $2" fatal "Unknown command $1 $2"
fi fi
......
...@@ -261,9 +261,8 @@ if [ -n "$UPLOADNOW" ] && is_gear $SPECDIR ; then ...@@ -261,9 +261,8 @@ if [ -n "$UPLOADNOW" ] && is_gear $SPECDIR ; then
if [ -n "$PREPARETASK" ] ; then if [ -n "$PREPARETASK" ] ; then
if [ -z "$TASKNUMBER" ] ; then if [ -z "$TASKNUMBER" ] ; then
showcmd "ssh $GEARHOST task ls" showcmd $ETERBUILDBIN/gita get last task
TASKNUMBER="$(ssh $GEARHOST task ls | head -n1 | sed -e "s|^#\([0-9]*\) .*|\1|g")" || fatal TASKNUMBER=$($ETERBUILDBIN/gita get last task)
# hack "
fi fi
else else
NUMSPECS=$(estrlist count $LISTNAMES) NUMSPECS=$(estrlist count $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