File tree Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -170,15 +170,26 @@ Target "PublishNuget" (fun _ ->
170
170
let apiKey = getBuildParamOrDefault " nugetkey" " "
171
171
let source = getBuildParamOrDefault " nugetpublishurl" " "
172
172
let symbolSource = getBuildParamOrDefault " symbolspublishurl" " "
173
+ let shouldPublishSymbolsPackages = not ( symbolSource = " " )
173
174
174
- let runSingleProject project =
175
- DotNetCli.RunCommand
176
- ( fun p ->
177
- { p with
178
- TimeOut = TimeSpan.FromMinutes 10. })
179
- ( sprintf " nuget push %s --api-key %s --source %s --symbol-source %s " project apiKey source symbolSource)
175
+ if ( not ( source = " " ) && not ( apiKey = " " ) && shouldPublishSymbolsPackages) then
176
+ let runSingleProject project =
177
+ DotNetCli.RunCommand
178
+ ( fun p ->
179
+ { p with
180
+ TimeOut = TimeSpan.FromMinutes 10. })
181
+ ( sprintf " nuget push %s --api-key %s --source %s --symbol-source %s " project apiKey source symbolSource)
182
+
183
+ projects |> Seq.iter ( runSingleProject)
184
+ else if ( not ( source = " " ) && not ( apiKey = " " ) && not shouldPublishSymbolsPackages) then
185
+ let runSingleProject project =
186
+ DotNetCli.RunCommand
187
+ ( fun p ->
188
+ { p with
189
+ TimeOut = TimeSpan.FromMinutes 10. })
190
+ ( sprintf " nuget push %s --api-key %s --source %s " project apiKey source)
180
191
181
- projects |> Seq.iter ( runSingleProject)
192
+ projects |> Seq.iter ( runSingleProject)
182
193
)
183
194
184
195
//--------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments