Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
neural-mmo-starter-kit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Neural MMO
neural-mmo-starter-kit
Commits
b49a1f41
You need to sign in or sign up before continuing.
Commit
b49a1f41
authored
3 years ago
by
Jyotish P
Browse files
Options
Downloads
Patches
Plain Diff
Fix git remote checks in `utils/submit.sh`
parent
74b74cd3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
utils/submit.sh
+16
-8
16 additions, 8 deletions
utils/submit.sh
with
16 additions
and
8 deletions
utils/submit.sh
+
16
−
8
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment