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
0564d0d7
Commit
0564d0d7
authored
Jan 10, 2020
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gitask: add -m <message> support for run and commit commands
parent
153815ee
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
gitask
bin/gitask
+17
-6
No files found.
bin/gitask
View file @
0564d0d7
#!/bin/sh
# 2017, 2018, 2019 (c) Etersoft https://etersoft.ru
# 2017, 2018, 2019
, 2020
(c) Etersoft https://etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
...
...
@@ -18,8 +18,8 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo
echo
"Examples:"
echo
" new [p8] - create new task [on p8 branch, Sisyphus by default]"
echo
" run [NNNN] - run task NNNN"
echo
" commit [NNNN] [NNNN2] - commit task(s) NNNN, [NNNN2]"
echo
" run [
-m <message>] [
NNNN] - run task NNNN"
echo
" commit [
-m <message>] [
NNNN] [NNNN2] - commit task(s) NNNN, [NNNN2]"
echo
" add del package [package2] - add package remove command"
echo
" add rebuild package [package2] - add package rebuild"
echo
" add --help - show task add help"
...
...
@@ -170,12 +170,19 @@ fi
if
[
"
$1
"
=
"commit"
]
;
then
shift
COMMIT
=
''
MESSAGE
=
''
if
[
"
$1
"
=
"-m"
]
;
then
MESSAGE
=
"
$1
$2
"
shift
2
fi
TASKLIST
=
"
$*
"
if
[
-z
"
$TASKLIST
"
]
;
then
TASKLIST
=
"
$(
get_last
)
"
||
fatal
"Can't get last task"
fi
for
TASK
in
$TASKLIST
;
do
docmd ssh
$GEARHOST
task run
--commit
"
$TASK
"
docmd ssh
$GEARHOST
task run
$MESSAGE
--commit
"
$TASK
"
done
exit
fi
...
...
@@ -197,10 +204,14 @@ if [ "$1" = "run" ] ; then
COMMIT
=
''
PARAMTEST
=
''
TASK
=
''
MESSAGE
=
''
while
[
-n
"
$1
"
]
;
do
if
echo
"
$1
"
|
grep
-qv
"^-
-
"
;
then
if
echo
"
$1
"
|
grep
-qv
"^-"
;
then
TASK
=
"
$1
"
elif
[
"
$1
"
=
"-m"
]
;
then
MESSAGE
=
"
$1
$2
"
shift
elif
[
"
$1
"
=
"--commit"
]
;
then
COMMIT
=
1
elif
[
"
$1
"
=
"--force"
]
;
then
...
...
@@ -220,7 +231,7 @@ if [ "$1" = "run" ] ; then
# force reset test status
[
-n
"
$COMMIT
"
]
&&
PARAMTEST
=
'--commit'
docmd ssh
$GEARHOST
task run
$PARAMTEST
"
$TASK
"
docmd ssh
$GEARHOST
task run
$
MESSAGE
$
PARAMTEST
"
$TASK
"
exit
fi
...
...
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