-
Notifications
You must be signed in to change notification settings - Fork 692
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
Implemented nuget.exe add and nuget.exe init commands #14
Conversation
|
|
@@ -5245,4 +5245,41 @@ nuget update -Self</value> | |||
<data name="CommandMSBuildVersion" xml:space="preserve"> | |||
<value>Specifies the version of MSBuild to be used with this command. Supported values are 4, 12, 14. By default the MSBuild in your path is picked, otherwise it defaults to the highest installed version of MSBuild.</value> | |||
</data> | |||
<data name="AddCommandDescription" xml:space="preserve"> | |||
<value>Adds a given package to the specified source if it is a file source. http sources are not supported.</value> |
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.
This doesn't really describe what the command is for
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.
+1, we need to explain the offline feed concept 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.
Discussed with @yishaigalatzer and updated the command description both for add and init. Check it out in the next iteration.
public class AddCommand : Command | ||
{ | ||
[Option(typeof(NuGetCommand), "AddCommandSourceDescription", AltName = "src")] | ||
public string Source { get; set; } |
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 check if we have a way to declare mandatory parameters
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.
No. We do not have a way today to declare mandatory parameters.
… This will be used by nuget.exe add and nuget.exe init
user-defined offline feed as controlled by settings.
mandatory source and destination feed for add and init respectively. Need to fix tests
and destination feed for nuget.exe init mandatory.
and nuget.exe init using an -Expand switch. Need to add tests
…found. 2) Added more tests for nuget.exe init
Verified manually that it works. Need to add tests
simplify the not exists check on the path both for add and init commands. 2) Renamed ValidatePath to ThrowIfInvalid. 3) Added tests for OfflineFeedUtility
moved the tests to NugetPackageUtilTests.cs. Also, fixed the existing tests to use the new signature for InstallFromSourceAsync
b77d921
to
d6e75a7
Compare
# This is the 1st commit message: Read unix executable plugins # This is the commit message #2: Add tests # This is the commit message #3: Use GetUnixFileMode # This is the commit message #4: Cleanup testing # This is the commit message #5: Add NUGET_PLUGIN_PATHS # This is the commit message #6: use empty body constructor # This is the commit message #7: NuGetPluginPaths Env variable used by dotnet tools only # This is the commit message #8: Plugins path env # This is the commit message #9: fix tests # This is the commit message #10: fix linux bash call # This is the commit message #11: remove some apis # This is the commit message #12: cleanup # This is the commit message #13: cleanup # This is the commit message #14: cleanup # This is the commit message #15: Use GetUnixFileMode # This is the commit message #16: Cleanup testing # This is the commit message #17: remove some apis # This is the commit message #18: stub # This is the commit message #19: Add test # This is the commit message #20: cleanup
# This is the 1st commit message: Read unix executable plugins # This is the commit message #2: Add tests # This is the commit message #3: Use GetUnixFileMode # This is the commit message #4: Cleanup testing # This is the commit message #5: Add NUGET_PLUGIN_PATHS # This is the commit message #6: use empty body constructor # This is the commit message #7: NuGetPluginPaths Env variable used by dotnet tools only # This is the commit message #8: Plugins path env # This is the commit message #9: fix tests # This is the commit message #10: fix linux bash call # This is the commit message #11: remove some apis # This is the commit message #12: cleanup # This is the commit message #13: cleanup # This is the commit message #14: cleanup # This is the commit message #15: Use GetUnixFileMode # This is the commit message #16: Cleanup testing # This is the commit message #17: remove some apis # This is the commit message #18: stub # This is the commit message #19: Add test # This is the commit message #20: cleanup # This is the commit message #21: cleanup # This is the commit message #22: cleanup # This is the commit message #23: oops # This is the commit message #24: Clean up # This is the commit message #25: undo
# This is the 1st commit message: Read unix executable plugins # This is the commit message #2: Add tests # This is the commit message #3: Use GetUnixFileMode # This is the commit message #4: Cleanup testing # This is the commit message #5: Add NUGET_PLUGIN_PATHS # This is the commit message #6: use empty body constructor # This is the commit message #7: NuGetPluginPaths Env variable used by dotnet tools only # This is the commit message #8: Plugins path env # This is the commit message #9: fix tests # This is the commit message #10: fix linux bash call # This is the commit message #11: remove some apis # This is the commit message #12: cleanup # This is the commit message #13: cleanup # This is the commit message #14: cleanup # This is the commit message #15: Use GetUnixFileMode # This is the commit message #16: Cleanup testing # This is the commit message #17: remove some apis # This is the commit message #18: stub # This is the commit message #19: Add test # This is the commit message #20: cleanup
# This is the 1st commit message: Read unix executable plugins # This is the commit message #2: Add tests # This is the commit message #3: Use GetUnixFileMode # This is the commit message #4: Cleanup testing # This is the commit message #5: Add NUGET_PLUGIN_PATHS # This is the commit message #6: use empty body constructor # This is the commit message #7: NuGetPluginPaths Env variable used by dotnet tools only # This is the commit message #8: Plugins path env # This is the commit message #9: fix tests # This is the commit message #10: fix linux bash call # This is the commit message #11: remove some apis # This is the commit message #12: cleanup # This is the commit message #13: cleanup # This is the commit message #14: cleanup # This is the commit message #15: Use GetUnixFileMode # This is the commit message #16: Cleanup testing # This is the commit message #17: remove some apis # This is the commit message #18: stub # This is the commit message #19: Add test # This is the commit message #20: cleanup # This is the commit message #21: cleanup # This is the commit message #22: cleanup # This is the commit message #23: oops # This is the commit message #24: Clean up # This is the commit message #25: undo
# This is the 1st commit message: Read unix executable plugins # This is the commit message #2: Add tests # This is the commit message #3: Use GetUnixFileMode # This is the commit message #4: Cleanup testing # This is the commit message #5: Add NUGET_PLUGIN_PATHS # This is the commit message #6: use empty body constructor # This is the commit message #7: NuGetPluginPaths Env variable used by dotnet tools only # This is the commit message #8: Plugins path env # This is the commit message #9: fix tests # This is the commit message #10: fix linux bash call # This is the commit message #11: remove some apis # This is the commit message #12: cleanup # This is the commit message #13: cleanup # This is the commit message #14: cleanup # This is the commit message #15: Use GetUnixFileMode # This is the commit message #16: Cleanup testing # This is the commit message #17: remove some apis # This is the commit message #18: stub # This is the commit message #19: Add test # This is the commit message #20: cleanup # This is the commit message #21: cleanup # This is the commit message #22: cleanup # This is the commit message #23: oops # This is the commit message #24: Clean up # This is the commit message #25: undo # This is the commit message #26: cleanup # This is the commit message #27: cleanup # This is the commit message #28: # This is a combination of 20 commits. # This is the 1st commit message: Read unix executable plugins # This is the commit message #2: Add tests # This is the commit message #3: Use GetUnixFileMode # This is the commit message #4: Cleanup testing # This is the commit message #5: Add NUGET_PLUGIN_PATHS # This is the commit message #6: use empty body constructor # This is the commit message #7: NuGetPluginPaths Env variable used by dotnet tools only # This is the commit message #8: Plugins path env # This is the commit message #9: fix tests # This is the commit message #10: fix linux bash call # This is the commit message #11: remove some apis # This is the commit message #12: cleanup # This is the commit message #13: cleanup # This is the commit message #14: cleanup # This is the commit message #15: Use GetUnixFileMode # This is the commit message #16: Cleanup testing # This is the commit message #17: remove some apis # This is the commit message #18: stub # This is the commit message #19: Add test # This is the commit message #20: cleanup
Both nuget.exe add and nuget.exe init follows the new v3 model to only copy the nupkg, extract the nuspec and create a SHA512 of the nupkg file at the destination. With a provision to expand the packages using '-Expand' switch
nuget.exe add: NuGet/Home#1421
Adds a given package to the specified source if it is a file source. http sources are not supported.
nuget.exe init: NuGet/Home#1423
Adds all the packages from a given feed to the specified destination feed if it is a file source feed. http feeds are not supported.
Following are pending and/or not covered in this change.
@yishaigalatzer @MeniZalzman @emgarten