-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(nuget): allow enabling Windows targeting for NuGet restore commands #38374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(nuget): allow enabling Windows targeting for NuGet restore commands #38374
Conversation
Co-authored-by: RahulGautamSingh <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll let @RahulGautamSingh have a re-review too, but one thing I noticed is that we also need to update:
renovate/lib/config/options/index.ts
Lines 2534 to 2563 in ddfa560
{ name: 'postUpdateOptions', description: 'Enable post-update options to be run after package/artifact updating.', type: 'array', default: [], subType: 'string', allowedValues: [ 'bundlerConservative', 'composerWithAll', 'dotnetWorkloadRestore', 'gomodMassage', 'gomodTidy', 'gomodTidy1.17', 'gomodTidyE', 'gomodUpdateImportPaths', 'gomodSkipVendor', 'gomodVendor', 'helmUpdateSubChartArchives', 'kustomizeInflateHelmCharts', 'npmDedupe', 'npmInstallTwice', 'pnpmDedupe', 'yarnDedupeFewer', 'yarnDedupeHighest', ], cli: false, env: false, mergeable: true, }, renovate/docs/usage/configuration-options.md
Line 3813 in ddfa560
## postUpdateOptions
Once those and the outstanding comments are addressed, this looks good to go!
Co-authored-by: Jamie Tanna <[email protected]>
const cmds = [ | ||
...dependentPackageFileNames.map( | ||
(fileName) => | ||
// it is essential that dotnetRestoreOpts are added directly after the previous arguments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it was added with an additional space, the only "problem" we'd see are that our tests would need to update as there'd be an additional space, right?
There's nothing the dotnet
CLI will have issues with?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thank you!
Will confirm ☝️ then we'll get this merged
Co-authored-by: RahulGautamSingh <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please take a look at the issue with import of Ajv
(Updated by @jamietanna - this is unrelated to this PR)
In case you need to allow Windows targeting during package restore, e.g. adding the `-p:EnableWindowsTargeting=true`. | ||
In Renovate, the same effect is achieved by adding `dotnetEnableWindowsTargeting` to `postUpdateOptions`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case you need to allow Windows targeting during package restore, e.g. adding the `-p:EnableWindowsTargeting=true`. | |
In Renovate, the same effect is achieved by adding `dotnetEnableWindowsTargeting` to `postUpdateOptions`. | |
In case you need to allow Windows targeting during package restore, e.g. adding the `-p:EnableWindowsTargeting=true`. | |
You can do so by adding `dotnetEnableWindowsTargeting` to the `postUpdateOptions`. |
Changes
dotnetEnableWindowsTargeting
topostUpdateOptions
ofnuget
manager-p:EnableWindowsTargeting=true
CLI arg to alldotnet restore
commands runContext
Please select one of the below:
AI assistance disclosure
Did you use AI tools to create any part of this pull request?
Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via:
The public repository: https://github.com/dolejska-daniel/renovate