Shortening the path of source files in source code nuget packages#577
Shortening the path of source files in source code nuget packages#577
Conversation
There was a problem hiding this comment.
Nice code 👍
It would be nice to at least have one NuGet package that has source code to be installed by the Test so we can ensure this woks / doesn't brake later.
We could even create a ZipFile on-the-fly just for testing instead of using a existing .nupkg
|
Will write tests tomorrow. |
| [Test] | ||
| [TestCase("Microsoft.Azure.WebJobs.Sources", "3.0.37")] | ||
| [TestCase("NServiceBus.Testing.Fakes.Sources", "7.1.13")] | ||
| public void TestSourceCodePackageInstall(string packageId, string packageVersion) |
There was a problem hiding this comment.
I added a check to see if Sources directory is added in the package root and ensured that contentFiles directory doesn't exist. I'm trying to thing of other generic checks that we could do while installing this but nothing comes to mind as directories/files under Sources will be very package-specific. H
JoC0de
left a comment
There was a problem hiding this comment.
I didn't see any more issues, I would only fix the formatting at some places. See e.g. the Compiler warnings about trailing whitespace.
This PR will sort out long paths made by source code packages by unpacking all source files inside the packageDirectory/Sources.