Skip to content

Commit

Permalink
fix: NuGet symbols not published (#3954) (#3966)
Browse files Browse the repository at this point in the history
* fix: NuGet symbols not published (#3954)

Updates the build script to handle the newer snupkg format.

* Update windows-release.yml to use V3 API of nuget.org (#3954)
  • Loading branch information
aloker authored and Aaronontheweb committed Nov 14, 2019
1 parent 0b473e8 commit 2f7638e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build-system/windows-release.yaml
Expand Up @@ -26,7 +26,7 @@ steps:
displayName: 'FAKE Build'
inputs:
filename: build.cmd
arguments: 'nuget nugetpublishurl=https://www.nuget.org/api/v2/package nugetkey=$(nugetKey)'
arguments: 'nuget nugetpublishurl=https://api.nuget.org/v3/index.json nugetkey=$(nugetKey)'

- task: GitHubRelease@0
displayName: 'GitHub release (create)'
Expand Down
13 changes: 5 additions & 8 deletions build.fsx
Expand Up @@ -512,17 +512,15 @@ Target "PublishNuget" (fun _ ->
if (shouldPushNugetPackages || shouldPushSymbolsPackages) then
printfn "Pushing nuget packages"
if shouldPushNugetPackages then
let normalPackages=
!! (outputNuGet @@ "*.nupkg")
-- (outputNuGet @@ "*.symbols.nupkg") |> Seq.sortBy(fun x -> x.ToLower())
let normalPackages= !! (outputNuGet @@ "*.nupkg") |> Seq.sortBy(fun x -> x.ToLower())
for package in normalPackages do
try
publishPackage (getBuildParamOrDefault "nugetpublishurl" "") (getBuildParam "nugetkey") 3 package
publishPackage (getBuildParamOrDefault "nugetpublishurl" "https://api.nuget.org/v3/index.json") (getBuildParam "nugetkey") 3 package
with exn ->
printfn "%s" exn.Message

if shouldPushSymbolsPackages then
let symbolPackages= !! (outputNuGet @@ "*.symbols.nupkg") |> Seq.sortBy(fun x -> x.ToLower())
let symbolPackages= !! (outputNuGet @@ "*.snupkg") |> Seq.sortBy(fun x -> x.ToLower())
for package in symbolPackages do
try
publishPackage (getBuildParam "symbolspublishurl") (getBuildParam "symbolskey") 3 package
Expand Down Expand Up @@ -627,14 +625,13 @@ Target "Help" <| fun _ ->
Target "HelpNuget" <| fun _ ->
List.iter printfn [
"usage: "
"build Nuget [nugetkey=<key> [nugetpublishurl=<url>]] "
" [symbolspublishurl=<url>] "
"build Nuget [nugetkey=<key> [nugetpublishurl=<url>]] [symbolskey=<key> symbolspublishurl=<url>]"
""
"In order to publish a nuget package, keys must be specified."
"If a key is not specified the nuget packages will only be created on disk"
"After a build you can find them in build/nuget"
""
"For pushing nuget packages to nuget.org and symbols to symbolsource.org"
"For pushing nuget packages and symbols to nuget.org"
"you need to specify nugetkey=<key>"
" build Nuget nugetKey=<key for nuget.org>"
""
Expand Down

0 comments on commit 2f7638e

Please sign in to comment.