Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Neural MMO
neural-mmo-starter-kit
Commits
b49a1f41
Commit
b49a1f41
authored
Jul 02, 2021
by
Jyotish P
Browse files
Fix git remote checks in `utils/submit.sh`
parent
74b74cd3
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/submit.sh
View file @
b49a1f41
...
...
@@ -21,22 +21,30 @@ bad_remote_message() {
exit
1
}
check_remote
()
{
log_info Checking git remote settings...
get_submission_remote
()
{
bad_remotes
=(
git@gitlab.aicrowd.com:neural-mmo/neural-mmo-starter-kit.git
http://gitlab.aicrowd.com/neural-mmo/neural-mmo-starter-kit.git
)
for
bad_remote
in
$bad_remotes
;
do
if
git remote
-v
|
grep
"
$bad_remote
"
>
/dev/null
;
then
bad_remote_message
submission_remote
=
""
for
remote
in
$(
git remote
)
;
do
remote
=
$(
git remote get-url
$remote
)
if
[[
!
"
$remote
"
=
~
"
$bad_remotes
"
]]
&&
echo
$remote
|
grep
"gitlab.aicrowd.com"
>
/dev/null
;
then
submission_remote
=
$remote
fi
done
if
!
git remote
-v
|
grep
"gitlab.aicrowd.com"
;
then
if
[[
"
$submission_remote
"
==
""
]]
;
then
bad_remote_message
fi
echo
$submission_remote
}
check_remote
()
{
log_info Checking git remote settings...
log_normal Using
$(
get_submission_remote
)
as the submission repository
}
...
...
@@ -50,7 +58,7 @@ setup_lfs() {
setup_commits
()
{
REMOTE
=
$(
g
it remote
-v
|
grep
gitlab.aicrowd.com |
head
-1
|
awk
'{print $1}'
)
REMOTE
=
$(
g
et_submission_remote
)
TAG
=
$(
echo
"
$@
"
|
sed
's/ /-/g'
)
git add
--all
git commit
-m
"Changes for submission-
$TAG
"
||
true
# don't exit when no new commits are there
...
...
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