Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
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
GitHub Mirror
Renovate Bot
renovate
Commits
f4ebbb78
Unverified
Commit
f4ebbb78
authored
3 years ago
by
Eric Citaire
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix(git-submodules): sequential submodules processing (#11659) (#11661)
parent
955942b5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/manager/git-submodules/extract.ts
+27
-34
27 additions, 34 deletions
lib/manager/git-submodules/extract.ts
with
27 additions
and
34 deletions
lib/manager/git-submodules/extract.ts
+
27
−
34
View file @
f4ebbb78
...
@@ -98,40 +98,33 @@ export default async function extractPackageFile(
...
@@ -98,40 +98,33 @@ export default async function extractPackageFile(
return
null
;
return
null
;
}
}
const
deps
=
(
const
deps
=
[];
await
Promise
.
all
(
for
(
const
{
name
,
path
}
of
depNames
)
{
depNames
.
map
(
async
({
name
,
path
})
=>
{
try
{
try
{
const
[
currentDigest
]
=
(
await
git
.
subModule
([
'
status
'
,
path
]))
const
[
currentDigest
]
=
(
await
git
.
subModule
([
'
status
'
,
path
]))
.
trim
()
.
trim
()
.
replace
(
/^
[
-+
]
/
,
''
)
.
replace
(
/^
[
-+
]
/
,
''
)
.
split
(
/
\s
/
);
.
split
(
/
\s
/
);
const
subModuleUrl
=
await
getUrl
(
git
,
gitModulesPath
,
name
);
const
subModuleUrl
=
await
getUrl
(
git
,
gitModulesPath
,
name
);
// hostRules only understands HTTP URLs
// hostRules only understands HTTP URLs
// Find HTTP URL, then apply token
// Find HTTP URL, then apply token
let
httpSubModuleUrl
=
getHttpUrl
(
subModuleUrl
);
let
httpSubModuleUrl
=
getHttpUrl
(
subModuleUrl
);
httpSubModuleUrl
=
getRemoteUrlWithToken
(
httpSubModuleUrl
);
httpSubModuleUrl
=
getRemoteUrlWithToken
(
httpSubModuleUrl
);
const
currentValue
=
await
getBranch
(
const
currentValue
=
await
getBranch
(
gitModulesPath
,
gitModulesPath
,
name
,
name
,
httpSubModuleUrl
httpSubModuleUrl
);
);
deps
.
push
({
return
{
depName
:
path
,
depName
:
path
,
lookupName
:
getHttpUrl
(
subModuleUrl
),
lookupName
:
getHttpUrl
(
subModuleUrl
),
currentValue
,
currentValue
,
currentDigest
,
currentDigest
,
});
};
}
catch
(
err
)
/* istanbul ignore next */
{
}
catch
(
err
)
/* istanbul ignore next */
{
logger
.
warn
({
err
},
'
Error mapping git submodules during extraction
'
);
logger
.
warn
(
}
{
err
},
}
'
Error mapping git submodules during extraction
'
);
return
null
;
}
})
)
).
filter
(
Boolean
);
return
{
deps
,
datasource
:
datasourceGitRefs
.
id
};
return
{
deps
,
datasource
:
datasourceGitRefs
.
id
};
}
}
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