Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
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
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SmartDataLab
public
applications
renovate
Commits
3b4a9b31
Commit
3b4a9b31
authored
8 years ago
by
Rhys Arkins
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Enhance config structure for package files (#37)
* Better nest packageFiles * fix lint
parent
c1360ab4
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/config/parser.js
+12
-5
12 additions, 5 deletions
app/config/parser.js
app/index.js
+1
-1
1 addition, 1 deletion
app/index.js
with
13 additions
and
6 deletions
app/config/parser.js
+
12
−
5
View file @
3b4a9b31
...
...
@@ -27,12 +27,11 @@ module.exports = function init() {
}
// Check if repository name and package file are provided via CLI
const
repoName
=
process
.
argv
[
2
];
const
packageFile
=
process
.
argv
[
3
]
||
'
package.json
'
;
if
(
repoName
)
{
cliConfig
.
repositories
=
[
{
name
:
repoName
,
packageFiles
:
[
p
ackageFile
],
repository
:
repoName
,
packageFiles
:
[
p
rocess
.
argv
[
3
]
||
'
package.json
'
],
},
];
}
...
...
@@ -40,7 +39,7 @@ module.exports = function init() {
// First, convert any strings to objects
config
.
repositories
.
forEach
((
repo
,
index
)
=>
{
if
(
typeof
repo
===
'
string
'
)
{
config
.
repositories
[
index
]
=
{
name
:
repo
};
config
.
repositories
[
index
]
=
{
repository
:
repo
};
}
});
// Add 'package.json' if missing
...
...
@@ -49,7 +48,15 @@ module.exports = function init() {
config
.
repositories
[
index
].
packageFiles
=
[
'
package.json
'
];
}
});
// Expand format
config
.
repositories
.
forEach
((
repo
,
index
)
=>
{
config
.
repositories
[
index
].
packageFiles
=
repo
.
packageFiles
.
map
((
packageFile
)
=>
{
if
(
typeof
packageFile
===
'
string
'
)
{
return
{
fileName
:
packageFile
};
}
return
packageFile
;
});
});
// Winston log level can be controlled via config or env
if
(
config
.
logLevel
)
{
...
...
This diff is collapsed.
Click to expand it.
app/index.js
+
1
−
1
View file @
3b4a9b31
...
...
@@ -13,7 +13,7 @@ let p = Promise.resolve();
// Queue up each repo/package combination
config
.
repositories
.
forEach
((
repo
)
=>
{
repo
.
packageFiles
.
forEach
((
packageFile
)
=>
{
p
=
p
.
then
(()
=>
renovate
(
repo
.
name
,
packageFile
));
p
=
p
.
then
(()
=>
renovate
(
repo
.
repository
,
packageFile
.
fileName
));
});
});
p
.
then
(()
=>
{
// eslint-disable-line promise/always-return
...
...
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