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

gitask: add build alias: gita add build <repo> <tag>

parent f62c6649
...@@ -21,8 +21,8 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then ...@@ -21,8 +21,8 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo " new [branch] - create new task on branch (Sisyphus by default)" echo " new [branch] - create new task on branch (Sisyphus by default)"
echo " run [--test-only] [NNNN] [NNNN2] [-m <message>] - run task NNNN" echo " run [--test-only] [NNNN] [NNNN2] [-m <message>] - run task NNNN"
echo " commit [NNNN] [NNNN2] [-m <message>] - commit task(s) NNNN, [NNNN2]" echo " commit [NNNN] [NNNN2] [-m <message>] - commit task(s) NNNN, [NNNN2]"
echo " add [NNNN] repo <gear repo> <gear tag> ... - add package build from repo command" echo " add [NNNN] (repo|build) <gear repo> <gear tag> ... - add package build from repo command"
echo " add [NNNN] repo <gear repo>.git=<gear tag> ... - add package build from repo command" echo " add [NNNN] (repo|build) <gear repo>.git=<gear tag> ... - add package build from repo command"
echo " add [NNNN] del package [package2...] - add package remove command" echo " add [NNNN] del package [package2...] - add package remove command"
echo " add [NNNN] rebuild package [package2...] - add package rebuild" echo " add [NNNN] rebuild package [package2...] - add package rebuild"
echo " add --help - show task add help" echo " add --help - show task add help"
...@@ -232,9 +232,11 @@ if [ "$1" = "copy" ] ; then ...@@ -232,9 +232,11 @@ if [ "$1" = "copy" ] ; then
[ -n "$PACKAGELIST" ] || fatal "no packages" [ -n "$PACKAGELIST" ] || fatal "no packages"
showcmd ssh $GEARHOST task new $TARGET showcmd ssh $GEARHOST task new $TARGET
TASK="$(ssh $GEARHOST task new $TARGET | head -n1)" || fatal # Note: | head hides status
TASK="$(ssh $GEARHOST task new $TARGET | head -n1)"
[ -n "$TASK" ] || fatal "Empty task"
for PACKAGE in $PACKAGELIST ; do for PACKAGE in $PACKAGELIST ; do
docmd ssh $GEARHOST task add $TASK copy $PACKAGE $FROMSTR docmd ssh $GEARHOST task add $TASK copy $PACKAGE $FROMSTR || fatal
done done
docmd ssh $GEARHOST task run $TASK docmd ssh $GEARHOST task run $TASK
exit exit
...@@ -244,7 +246,7 @@ if [ "$1" = "add" ] || [ "$1" = "Add" ] ; then ...@@ -244,7 +246,7 @@ if [ "$1" = "add" ] || [ "$1" = "Add" ] ; then
[ "$1" = "Add" ] && NEXTCOMMAND="run" [ "$1" = "Add" ] && NEXTCOMMAND="run"
SUBTASK='' SUBTASK=''
ADDCMD='' ADDCMD=''
ADDCMDLIST="del copy repo rebuild" ADDCMDLIST="del copy repo build rebuild"
# add TASKNUMBER package # add TASKNUMBER package
if is_task_number "$2" && estrlist has "$3" $ADDCMDLIST ; then if is_task_number "$2" && estrlist has "$3" $ADDCMDLIST ; then
TASK="$(get_task_number $2)" TASK="$(get_task_number $2)"
...@@ -265,7 +267,10 @@ if [ "$1" = "add" ] || [ "$1" = "Add" ] ; then ...@@ -265,7 +267,10 @@ if [ "$1" = "add" ] || [ "$1" = "Add" ] ; then
[ -n "$1" ] || fatal "no packages" [ -n "$1" ] || fatal "no packages"
[ "$ADDCMD" = "build" ] && ADDCMD="repo"
OADDCMD=$ADDCMD OADDCMD=$ADDCMD
while [ -n "$1" ] ; do while [ -n "$1" ] ; do
PACKAGE="$1" PACKAGE="$1"
if [ "$OADDCMD" = "repo" ] ; then if [ "$OADDCMD" = "repo" ] ; then
......
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