Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ActEV
diva_evaluation_cli
Commits
e8ad6278
Commit
e8ad6278
authored
Jan 27, 2020
by
Baptiste CHOCOT
Browse files
bugfix: prevent from "Cloning into 'None'..."
parent
cf0ced2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
diva_evaluation_cli/bin/private_src/entry_points/actev_get_system.py
View file @
e8ad6278
...
...
@@ -8,7 +8,7 @@ from diva_evaluation_cli.bin.private_src.implementation.utils.actev_cli_environm
from
diva_evaluation_cli.bin.private_src.implementation.get_system.system_types_definition
import
system_types
def
entry_point
(
url
,
system_type
,
location
=
None
,
user
=
None
,
password
=
None
,
token
=
None
,
install_cli
=
False
,
name
=
False
,
sha
=
Non
e
):
def
entry_point
(
url
,
system_type
,
location
=
None
,
user
=
None
,
password
=
None
,
token
=
None
,
install_cli
=
False
,
sha
=
None
,
name
=
Fals
e
):
"""Private entry point.
Downloads a credentialed, web-accessible content into src
...
...
@@ -63,13 +63,15 @@ def entry_point(url, system_type, location=None, user=None, password=None, token
install_cli
=
"True"
else
:
install_cli
=
"False"
if
not
name
:
name
=
"None"
# SHA
if
not
sha
:
sha
=
"None"
if
not
name
:
name
=
""
# go into the right directory to execute the script
path
=
os
.
path
.
dirname
(
__file__
)
script
=
os
.
path
.
join
(
path
,
'../implementation/get_system/get/'
+
script
)
...
...
@@ -79,8 +81,8 @@ def entry_point(url, system_type, location=None, user=None, password=None, token
" "
+
password
+
\
" "
+
token
+
\
" "
+
install_cli
+
\
" "
+
name
+
\
" "
+
sha
" "
+
sha
+
\
" "
+
name
# execute the script
# status is the exit status code returned by the program
...
...
diva_evaluation_cli/bin/private_src/implementation/get_system/get/get_git.sh
View file @
e8ad6278
...
...
@@ -6,8 +6,8 @@ user=$3
password
=
$4
token
=
$5
cli
=
$6
name
=
$7
sha
=
$8
sha
=
$7
name
=
$8
# If there are credentials
# Replace '@' by its hexa character to clean the fields to avoid confusion with the '@' delimiter
...
...
@@ -33,10 +33,6 @@ if [ $location != "None" ];then
cd
$location
fi
if
[
$name
==
"None"
]
;
then
name
=
""
fi
git clone
--recursive
$url
$name
if
[
$?
-eq
0
]
;
then
...
...
Write
Preview
Supports
Markdown
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