-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Update csproj files to the latest version of the package references #5961
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
Conversation
|
Is this PR also to close #5957 ? |
| if($name -and $name -ne 'Microsoft.Management.Infrastructure') | ||
| { | ||
| # Get the current package from nuget | ||
| $newPackage = find-package -Name $name -Source https://nuget.org/api/v2/ -ErrorAction SilentlyContinue |
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.
'donet add package' apparently handles updating nuget packages as well. We should not re-invent the wheel when it comes to getting/updating nuget packages in csproj (I assume that this is the end goal for which this function is written for)
tools/releaseTools.psm1
Outdated
| $Path = (Join-path -Path $PSScriptRoot -ChildPath '..') | ||
| ) | ||
| # Calculate the filter to find the CSProj files | ||
| $path = Join-path -Path $PSScriptRoot -ChildPath '..' |
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.
You override the path argument passed in by the caller.
tools/releaseTools.psm1
Outdated
| ) | ||
| # Calculate the filter to find the CSProj files | ||
| $path = Join-path -Path $PSScriptRoot -ChildPath '..' | ||
| $filter = Join-Path -Path $path -ChildPath '*.csproj' |
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.
Minor: change $path to $Path because the parameter is $Path
|
@bergmeister I reverted some of my changes and tried |
|
What is our policy - how frequently we should check existence of new packages ? |
tools/releaseTools.psm1
Outdated
| #.OUTPUTS | ||
| #Objects which represet the csproj package ref, with the current and new version | ||
| ############################## | ||
| function Get-NewPackage |
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.
Can you please change the name to Get-NewOfficalPackage?
daxian-dbw
left a comment
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.
LGTM. Left one unblocking comment
|
@iSazonov The guideline in practice is:
|
PR Summary
Update csproj files to the lates version of the package references
Fixes #5957
PR Checklist
Note: Please mark anything not applicable to this PR
NA.[feature]if the change is significant or affects feature testsWIP:to the beginning of the title and remove the prefix when the PR is ready.