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
1
Merge Requests
1
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
You need to sign in or sign up before continuing.
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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
12 deletions
+22
-12
gitask
bin/gitask
+22
-12
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
=
''
shift
TASK
=
''
FORCERUN
=
1
fi
while
[
-n
"
$1
"
]
;
do
PARAM
=
''
if
echo
"
$1
"
|
grep
-qv
"^--"
;
then
TASK
=
"
$1
"
TASK
=
"
$1
"
[
-n
"
$TASK
"
]
||
TASK
=
"
$(
get_last
)
"
||
fatal
"Can't get last task"
elif
[
"
$1
"
=
"--force"
]
;
then
shift
if
[
"
$1
"
=
"--force"
]
;
then
shift
FORCERUN
=
1
FORCERUN
=
1
elif
[
"
$1
"
=
"--test"
]
||
[
"
$1
"
=
"--test-only"
]
;
then
PARAMTEST
=
'--test-only'
else
info
"Unknown param
$1
"
fi
fi
get_test_status
"
$TASK
"
&&
echo
"
$@
"
|
grep
-qv
--
"--test-only"
&&
PARAM
=
'--test-only'
shift
[
-n
"
$FORCERUN
"
]
&&
PARAM
=
''
done
docmd ssh
$GEARHOST
task run
$PARAM
"
$TASK
"
[
-n
"
$TASK
"
]
||
TASK
=
"
$(
get_last
)
"
||
fatal
"Can't get last task"
# keep test status
get_test_status
"
$TASK
"
&&
PARAMTEST
=
'--test-only'
# force reset test status
[
-n
"
$FORCERUN
"
]
&&
PARAMTEST
=
''
docmd ssh
$GEARHOST
task run
$PARAMTEST
"
$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