Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
8d5a3dd3
Commit
8d5a3dd3
authored
Jun 23, 2018
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gitask: keep --test-only when run, support log for last task, improve help
parent
ec0c2092
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
10 deletions
+28
-10
gitask
bin/gitask
+28
-10
No files found.
bin/gitask
View file @
8d5a3dd3
#!/bin/sh
# 2017 (c) Etersoft https://etersoft.ru
# 2017
, 2018
(c) Etersoft https://etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
...
...
@@ -17,12 +17,14 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
docmd ssh
$GEARHOST
task
help
|
sed
-e
"s|abort|cancel|g"
echo
echo
"Examples:"
echo
" new [p8] - create new task [on p8]"
echo
" add del package - add package remove command"
echo
" share NNNN [enable] - share task NNNN"
echo
" log NNNN - show build log for task NNNN"
echo
" show NNNN - show subtask list for task NNNN"
echo
" cancel NNNN - cancel task NNNN"
echo
" new [p8] - create new task [on p8]"
echo
" run [NNNN] [--test-only] - run task NNNN"
echo
" add del package - add package remove command"
echo
" share NNNN [enable] - share task NNNN"
echo
" find PACKAGE - do find-package of PACKAGE"
echo
" log NNNN - show build log for task NNNN"
echo
" show NNNN - show subtask list for task NNNN"
echo
" cancel NNNN - cancel task NNNN"
exit
0
fi
...
...
@@ -31,6 +33,11 @@ get_last()
ssh
$GEARHOST
task
ls
|
head
-n1
|
sed
-e
"s|^#
\(
[0-9]*
\)
.*|
\1
|g"
||
fatal
}
get_test_status
()
{
ssh
$GEARHOST
task
ls
|
grep
-v
"^
$1
"
||
fatal
}
# TODO: acl
epm assure girar-show girar-utils
...
...
@@ -61,9 +68,10 @@ fi
if
[
"
$1
"
=
"log"
]
;
then
shift
# TODO: show last task without args
showcmd
"
$GEARHOST
>"
girar-show
"
$@
"
GIT_ALT
=
$GEARHOST
girar-show
"
$@
"
TASK
=
"
$1
"
[
-n
"
$TASK
"
]
||
TASK
=
"
$(
get_last
)
"
||
fatal
showcmd
"
$GEARHOST
>"
girar-show
"
$TASK
"
GIT_ALT
=
$GEARHOST
girar-show
"
$TASK
"
exit
fi
...
...
@@ -85,6 +93,16 @@ if [ "$1" = "quota" ] ; then
exit
fi
if
[
"
$1
"
=
"run"
]
;
then
shift
PARAM
=
''
TASK
=
"
$1
"
[
-n
"
$TASK
"
]
||
TASK
=
"
$(
get_last
)
"
||
fatal
get_test_status
"
$TASK
"
&&
echo
"
$@
"
|
grep
-qv
--
"--test-only"
&&
PARAM
=
'--test-only'
docmd ssh
$GEARHOST
task run
$PARAM
"
$@
"
exit
fi
if
[
"
$1
"
=
"cancel"
]
;
then
shift
#TASK="$(get_last)" || fatal
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment