libpalaso
libpalaso copied to clipboard
Investigate/document how to always get latest version of nuget package
Some projects might want to always build with the latest version of a nuget package. This needs to be researched and documented.
- it looks like nuget has an option to do that (mentioned in NuGet 2.8 Release Notes)
- another option might be to use the alternative package manager
Paket
IMO doing it directly with nuget would be the preferred way because of the integration in the IDEs and tools, which makes it easier to use and less maintenance with new versions.
Brainstorm: One approach could be to add a Build step in TeamCity that does it. I hypothesize that you could use the NuGet Installer step, and use some clever set of parameters to get it to update a certain set of dependencies to the latest. Inspired by: https://stackoverflow.com/a/15039174/311238 Downside though (or upside, depending on your needs), this wouldn't work on local builds for develoeprs.
According to this article, "floating" version numbers are supported: => When using the PackageReference format, NuGet also supports using a floating notation, *, for Major, Minor, Patch, and pre-release suffix parts of the number. Floating versions are not supported with the packages.config format. When a floating version is specified, the rule is to resolve to the highest existent version that matches the version description. Examples of floating versions and the resolutions are below. It seems this would be the way to do it, but it would mean that a different branch with a pinned version specification would be needed for release builds.
Maybe we could write a new SIL BuildTask that would be able to go through the PackageReference elements for libpalaso packages and turn hard version numbers into floating version references. Then a .proj file could just have a special target to execute that build task before performing the regular build. A CI build for the active development branch could specify that build target.
I wonder if nuget has something like that built in, or if there is a tool that does that. Because if you update the packages in VS or Rider it'll update the version numbers.
A different direction would be to use https://github.com/marketplace/actions/nukeeper-action, with the "repo" option, to automatically generate PRs when libpalaso is upgraded.
it would mean that a different branch with a pinned version specification would be needed for release builds.
That would mimic what we do currently, anyway. So if * works, that gives us what we want.
Our current process: The Alpha channel builds from master branch using latest TC dependencies. All other channels use release branches which are pinned to specific TC builds for dependencies.
A different direction would be to use https://github.com/marketplace/actions/nukeeper-action, with the "repo" option, to automatically generate PRs when libpalaso is upgraded.
Looks like SIL.FwBuildTasks uses WhiteSource Renovate to do this same thing.