-
Notifications
You must be signed in to change notification settings - Fork 696
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
Adding support for pushing multiple packages #3739
Adding support for pushing multiple packages #3739
Conversation
src/NuGet.Core/NuGet.Protocol/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt
Show resolved
Hide resolved
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.
Thanks for your contribution! I'll go ahead and run CI on your branch to get some early feedback until you can address my comments...
In #3140, I added tests to ensure wildcard of *
works correctly when automatically pushing .snupkg
's. I'd like some sort of functional test (or additional assertions) to make sure your PR doesn't regress that behavior.
Specifically, how will these scenarios fit with your change? (see my PR above)
PushCommand_Server_Nupkg_ByWildcard_SnupkgDoesNotExist_NoFileNotFoundError()
PushCommand_Server_Snupkg_ByFilename_DoesNotExist_FileNotFoundError()
test/NuGet.Clients.Tests/NuGet.CommandLine.Test/NuGetPushCommandTest.cs
Outdated
Show resolved
Hide resolved
test/NuGet.Clients.Tests/NuGet.CommandLine.Test/NuGetPushCommandTest.cs
Outdated
Show resolved
Hide resolved
The dotnet formatting analyzers are failing for some of your changes. Try running CI failed to build your changes. It looks like your
Did you run |
No, my mistake. But still it shouldn't happen as I was running |
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.
@donnie-msft I hope I addressed all your comments, can you have another look ?
test/NuGet.Clients.Tests/NuGet.CommandLine.Test/NuGetPushCommandTest.cs
Outdated
Show resolved
Hide resolved
test/NuGet.Clients.Tests/NuGet.CommandLine.Test/NuGetPushCommandTest.cs
Outdated
Show resolved
Hide resolved
test/NuGet.Clients.FuncTests/NuGet.CommandLine.FuncTest/Commands/PushCommandTest.cs
Outdated
Show resolved
Hide resolved
test/NuGet.Clients.FuncTests/NuGet.CommandLine.FuncTest/Commands/PushCommandTest.cs
Outdated
Show resolved
Hide resolved
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.
Thanks for contributing! Running CI...
{ | ||
var errorMsg = string.Format(MESSAGE_FILE_DOES_NOT_EXIST, snupkgsToPush[i]); | ||
|
||
// Only the first file that is missing should be mentioned in logs |
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.
Nice!
@@ -68,5 +69,36 @@ public static class PushRunner | |||
symbolPackageUpdateResource, | |||
logger); | |||
} | |||
|
|||
[Obsolete("Use Run method which takes multiple package paths.")] | |||
public static Task Run( |
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 can't understand logic of adding public
also same time obsolete
method. If it's doesn't exist before then why bother to add now.
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.
It looks wrong but only because of how the diff is being shown.
Actually my change is deprecating the previously existing method which takes string packagePath
and adding a new one which takes IList<string> packagePaths
.
} | ||
} | ||
} | ||
|
||
[Obsolete("Use Push method which takes multiple package paths.")] |
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.
Same here.
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.
Same, it looks wrong but only because of how the diff is being shown.
Failing tests (on both Windows/Mac): PushCommand_PushToServer_ApiKeyAsNamedArgument
PushCommand_PushToServer_ApiKeyAsThirdArgument
|
Well, it is more complicated than I thought. I think I'll revert changes for |
Yes, I've checked with the team and it's good to move forward with your |
- Adding NuGet.XPlat tests
- Adding NuGet.XPlat tests
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.
All right, I've reverted changes related to the nuget.exe
.
@@ -68,5 +69,36 @@ public static class PushRunner | |||
symbolPackageUpdateResource, | |||
logger); | |||
} | |||
|
|||
[Obsolete("Use Run method which takes multiple package paths.")] | |||
public static Task Run( |
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.
It looks wrong but only because of how the diff is being shown.
Actually my change is deprecating the previously existing method which takes string packagePath
and adding a new one which takes IList<string> packagePaths
.
} | ||
} | ||
} | ||
|
||
[Obsolete("Use Push method which takes multiple package paths.")] |
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.
Same, it looks wrong but only because of how the diff is being shown.
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! I'm really excited that we're adding this, and also that we're not holding up dotnet.exe in order to do it. We'll deal with NuGet.exe eventually. Thanks for the PR!
Does this also include shells that by default does not do file globbing when you do |
@AraHaan NuGet can do globbing internally so your scenario was supported even before my change, |
@marcin-krystianc I was making sure as I will need some way to replace the github action that pushes since it only allows pushing one and it is not feasible as I would like to move my workflows and everything from a However not sure if repositories could override only specific files from that repository if they need to while using the rest from that repository if need be. |
Bug
Fixes: NuGet/Home#4393
Regression: No
Fix
Details: Following the advice from the NuGet/Home#4393 (comment).
After this change, the
push
command takes one or more paths. So it still works as expected even when thedotnet nuget push *.nupkg
command is run from the shell that supports globbing and*.nupkg
is being expanded to multiple arguments.Testing/Validation
Tests Added: Yes