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
d3667a27
Commit
d3667a27
authored
Jul 01, 2018
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gitask: rewrite task run options parsing
parent
04c53c9a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
13 deletions
+23
-13
gitask
bin/gitask
+23
-13
No files found.
bin/gitask
View file @
d3667a27
...
@@ -95,22 +95,32 @@ fi
...
@@ -95,22 +95,32 @@ fi
if
[
"
$1
"
=
"run"
]
;
then
if
[
"
$1
"
=
"run"
]
;
then
shift
shift
FORCERUN
=
''
FORCERUN
=
''
if
[
"
$1
"
=
"--force"
]
;
then
PARAMTEST
=
''
TASK
=
''
while
[
-n
"
$1
"
]
;
do
if
echo
"
$1
"
|
grep
-qv
"^--"
;
then
TASK
=
"
$1
"
elif
[
"
$1
"
=
"--force"
]
;
then
FORCERUN
=
1
elif
[
"
$1
"
=
"--test"
]
||
[
"
$1
"
=
"--test-only"
]
;
then
PARAMTEST
=
'--test-only'
else
info
"Unknown param
$1
"
fi
shift
shift
FORCERUN
=
1
done
fi
PARAM
=
''
TASK
=
"
$1
"
[
-n
"
$TASK
"
]
||
TASK
=
"
$(
get_last
)
"
||
fatal
"Can't get last task"
[
-n
"
$TASK
"
]
||
TASK
=
"
$(
get_last
)
"
||
fatal
"Can't get last task"
shift
if
[
"
$1
"
=
"--force"
]
;
then
# keep test status
shift
get_test_status
"
$TASK
"
&&
PARAMTEST
=
'--test-only'
FORCERUN
=
1
# force reset test status
fi
[
-n
"
$FORCERUN
"
]
&&
PARAMTEST
=
''
get_test_status
"
$TASK
"
&&
echo
"
$@
"
|
grep
-qv
--
"--test-only"
&&
PARAM
=
'--test-only'
[
-n
"
$FORCERUN
"
]
&&
PARAM
=
''
docmd ssh
$GEARHOST
task run
$PARAMTEST
"
$TASK
"
docmd ssh
$GEARHOST
task run
$PARAM
"
$TASK
"
exit
exit
fi
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