Create and publish .NET NuGet packages. - #8576
Conversation
Create the various NuGet packages to support .NET 5+. The packages are currently empty (and not very useful), but the actual content will come later. The current set of NuGet packages are (this list is duplicated for each platform: iOS, tvOS, watchOS and macOS): * Microsoft.iOS.Sdk: currently contains the basic MSBuild targets files for an MSBuild Project SDK. Will eventually contain all the build logic. Might also eventually contain other tools (mlaunch, bgen, etc.), but these might also end up in a different package. * Microsoft.iOS.Ref: will contain the Xamarin.iOS.dll reference assembly. * Microsoft.iOS.Runtime.[RID]: will contain architecture-specific files (libxamarin*.dylib, the Xamarin.iOS.dll implementation assembly, etc.): The NuGets built on CI are automatically published to a NuGet feed. The versioning for the NuGet packages required a few changes: OS bumps are now changed in Make.versions instead of Make.config (this is explained in the files themselves as well).
|
Test failures are unrelated
|
This comment has been minimized.
This comment has been minimized.
| @printf "IOS_NUGET_COMMIT_DISTANCE:=$(shell LANG=C; export LANG; git --git-dir $(TOP)/.git log `git --git-dir $(TOP)/.git blame -- ./Make.versions HEAD | grep IOS_NUGET_VERSION= | sed 's/ .*//' `..HEAD --oneline | wc -l | sed 's/ //g')\n" >> $@ | ||
| @printf "TVOS_NUGET_COMMIT_DISTANCE:=$(shell LANG=C; export LANG; git --git-dir $(TOP)/.git log `git --git-dir $(TOP)/.git blame -- ./Make.versions HEAD | grep TVOS_NUGET_VERSION= | sed 's/ .*//' `..HEAD --oneline | wc -l | sed 's/ //g')\n" >> $@ | ||
| @printf "WATCHOS_NUGET_COMMIT_DISTANCE:=$(shell LANG=C; export LANG; git --git-dir $(TOP)/.git log `git --git-dir $(TOP)/.git blame -- ./Make.versions HEAD | grep WATCHOS_NUGET_VERSION= | sed 's/ .*//' `..HEAD --oneline | wc -l | sed 's/ //g')\n" >> $@ | ||
| @printf "MACOS_NUGET_COMMIT_DISTANCE:=$(shell LANG=C; export LANG; git --git-dir $(TOP)/.git log `git --git-dir $(TOP)/.git blame -- ./Make.versions HEAD | grep MACOS_NUGET_VERSION= | sed 's/ .*//' `..HEAD --oneline | wc -l | sed 's/ //g')\n" >> $@ |
There was a problem hiding this comment.
Evil question, can you use a template for this? It just changes the grep param, correct?
There was a problem hiding this comment.
Two things change: the grep parameter and the output variable. I'm not sure using a template is a net win in terms of code size, since it's only 6 lines of duplication. If something should be done it's probably to extract the logic for the whole target into a shell script, which would also make it possible to not run git blame 6 times, which a template wouldn't do. In any case, that's unrelated to this PR and can be done later.
| # push | ||
| for nuget in "${NUGETS[@]}"; do | ||
| nuget="$(realpath "$nuget")" | ||
| nuget push "$nuget" -Source FEEDME -ApiKey WHATEVER -NonInteractive "${VERBOSITY[@]}" -ConfigFile $CONFIG_FILE |
There was a problem hiding this comment.
What is the diff between this and using 'dotnet nuget push' ?
There was a problem hiding this comment.
There doesn't seem to be a difference as far as I can tell.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Build success |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Test failure is unrelated: |
Create the various NuGet packages to support .NET 5+. The packages are
currently empty (and not very useful), but the actual content will come later.
The current set of NuGet packages are (this list is duplicated for each
platform: iOS, tvOS, watchOS and macOS):
MSBuild Project SDK. Will eventually contain all the build logic. Might also
eventually contain other tools (mlaunch, bgen, etc.), but these might also
end up in a different package.
(libxamarin*.dylib, the Xamarin.iOS.dll implementation assembly, etc.):
The NuGets built on CI are automatically published to a NuGet feed.
The versioning for the NuGet packages required a few changes: OS bumps are now
changed in Make.versions instead of Make.config (this is explained in the
files themselves as well).