mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-11 22:46:27 +00:00
feat(manager): renovate nuget DotNetCliToolReference (#6200)
This commit is contained in:
parent
3dbabadecf
commit
29fe28c359
2 changed files with 8 additions and 3 deletions
|
@ -144,6 +144,12 @@ Array [
|
||||||
"depName": "Range3",
|
"depName": "Range3",
|
||||||
"depType": "nuget",
|
"depType": "nuget",
|
||||||
},
|
},
|
||||||
|
Object {
|
||||||
|
"currentValue": "1.0.0",
|
||||||
|
"datasource": "nuget",
|
||||||
|
"depName": "Microsoft.VisualStudio.Web.CodeGeneration.Tools",
|
||||||
|
"depType": "nuget",
|
||||||
|
},
|
||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,7 @@ async function determineRegistryUrls(
|
||||||
return registryUrls;
|
return registryUrls;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const packageRe = /<(?:PackageReference|DotNetCliToolReference).*Include\s*=\s*"([^"]+)".*Version\s*=\s*"(?:[[])?(?:([^"(,[\]]+)\s*(?:,\s*[)\]]|])?)"/;
|
||||||
export async function extractPackageFile(
|
export async function extractPackageFile(
|
||||||
content: string,
|
content: string,
|
||||||
packageFile: string,
|
packageFile: string,
|
||||||
|
@ -90,9 +91,7 @@ export async function extractPackageFile(
|
||||||
* so we don't include it in the extracting regexp
|
* so we don't include it in the extracting regexp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const match = /<PackageReference.*Include\s*=\s*"([^"]+)".*Version\s*=\s*"(?:[[])?(?:([^"(,[\]]+)\s*(?:,\s*[)\]]|])?)"/.exec(
|
const match = packageRe.exec(line);
|
||||||
line
|
|
||||||
);
|
|
||||||
if (match) {
|
if (match) {
|
||||||
const depName = match[1];
|
const depName = match[1];
|
||||||
const currentValue = match[2];
|
const currentValue = match[2];
|
||||||
|
|
Loading…
Reference in a new issue