Commit bc70aa1c authored by Vitaly Lipatov's avatar Vitaly Lipatov

gitask: use improved message

parent 835c8043
...@@ -196,13 +196,16 @@ if [ "$1" = "run" ] || [ "$1" = "commit" ] ; then ...@@ -196,13 +196,16 @@ if [ "$1" = "run" ] || [ "$1" = "commit" ] ; then
TASKLIST='' TASKLIST=''
MESSAGE='' MESSAGE=''
MESSAGETEXT=''
while [ -n "$1" ] ; do while [ -n "$1" ] ; do
# TODO: check for number? # TODO: check for number?
if echo "$1" | grep -qv "^-" ; then if echo "$1" | grep -qv "^-" ; then
TASKLIST="$TASKLIST $1" TASKLIST="$TASKLIST $1"
elif [ "$1" = "-m" ] ; then elif [ "$1" = "-m" ] ; then
MESSAGE="$1 ${2// /_}" #MESSAGE="$1 ${2// /_}"
MESSAGE="-m -"
MESSAGETEXT="$2"
shift shift
else else
fatal "Unknown param $1" fatal "Unknown param $1"
...@@ -213,7 +216,7 @@ if [ "$1" = "run" ] || [ "$1" = "commit" ] ; then ...@@ -213,7 +216,7 @@ if [ "$1" = "run" ] || [ "$1" = "commit" ] ; then
[ -n "$TASKLIST" ] || TASKLIST="$(get_last)" || fatal "Can't get last task" [ -n "$TASKLIST" ] || TASKLIST="$(get_last)" || fatal "Can't get last task"
for TASK in $TASKLIST ; do for TASK in $TASKLIST ; do
docmd ssh $GEARHOST task run $MESSAGE $COMMIT "$TASK" echo "$MESSAGETEXT" | docmd ssh $GEARHOST task run $MESSAGE $COMMIT "$TASK"
done done
exit exit
fi fi
......
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