[dotnet] include .snupkg in nuget_push runfiles so symbols get published
diff --git a/dotnet/private/nuget_push.bzl b/dotnet/private/nuget_push.bzl index 9bc2510..82471bf 100644 --- a/dotnet/private/nuget_push.bzl +++ b/dotnet/private/nuget_push.bzl
@@ -38,6 +38,8 @@ """Create bash script for Unix/macOS/Linux.""" push_commands = [] for nupkg in nupkg_files: + if not nupkg.basename.endswith(".nupkg"): + continue nupkg_runfiles_path = _to_runfiles_path(nupkg.short_path) push_commands.append( '"$DOTNET" nuget push "$RUNFILES_DIR/{nupkg}" --api-key "$NUGET_API_KEY" --source "$NUGET_SOURCE" --skip-duplicate'.format(nupkg = nupkg_runfiles_path), @@ -77,6 +79,8 @@ """Create batch script for Windows.""" push_commands = [] for nupkg in nupkg_files: + if not nupkg.basename.endswith(".nupkg"): + continue nupkg_runfiles_path = _to_runfiles_path(nupkg.short_path).replace("/", "\\") push_commands.append( '"%%DOTNET%%" nuget push "%%~dp0%s" --api-key "%%NUGET_API_KEY%%" --source "%%NUGET_SOURCE%%" --skip-duplicate' % nupkg_runfiles_path, @@ -107,7 +111,7 @@ "packages": attr.label_list( doc = "The nupkg files to push", mandatory = True, - allow_files = [".nupkg"], + allow_files = [".nupkg", ".snupkg"], ), "_windows_constraint": attr.label( default = "@platforms//os:windows",