Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/app/Fake.DotNet.Cli/DotNet.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,7 @@ module DotNet =
|> List.concat
|> List.filter (not << String.IsNullOrEmpty)

/// nuget push paramters for `dotnet nuget push`
/// nuget push parameters for `dotnet nuget push`
type NuGetPushOptions =
{ Common: Options
PushParams: NuGet.NuGetPushParams }
Expand Down Expand Up @@ -1681,6 +1681,9 @@ module DotNet =
use __ = Trace.traceTask "DotNet:nuget:push" nupkg
let param = NuGetPushOptions.Create() |> setParams
let pushParams = param.PushParams
pushParams.ApiKey |> Option.iter (fun key -> TraceSecrets.register "<ApiKey>" key)
pushParams.SymbolApiKey |> Option.iter (fun key -> TraceSecrets.register "<SymbolApiKey>" key)

let args = Args.toWindowsCommandLine (nupkg :: buildNugetPushArgs pushParams)
let result = exec (fun _ -> param.Common) "nuget push" args

Expand Down
8 changes: 4 additions & 4 deletions src/app/Fake.DotNet.NuGet/NuGet.fs
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ let private propertiesParam = function

/// Creates a NuGet package without templating (including symbols package if enabled)
let private pack parameters nuspecFile =
TraceSecrets.register parameters.AccessKey "<NuGetKey>"
TraceSecrets.register parameters.SymbolAccessKey "<NuGetSymbolKey>"
TraceSecrets.register "<NuGetKey>" parameters.AccessKey
TraceSecrets.register "<NuGetSymbolKey>" parameters.SymbolAccessKey
let nuspecFile = Path.getFullName nuspecFile
let properties = propertiesParam parameters.Properties
let basePath = parameters.BasePath |> Option.map (sprintf "-BasePath \"%s\"") |> Option.defaultValue ""
Expand Down Expand Up @@ -433,8 +433,8 @@ let internal toPushCliArgs param =
|> List.filter (not << String.IsNullOrEmpty)

let rec private push (options : ToolOptions) (parameters : NuGetPushParams) nupkg =
parameters.ApiKey |> Option.iter (fun key -> TraceSecrets.register key "<NuGetKey>")
parameters.SymbolApiKey |> Option.iter (fun key -> TraceSecrets.register key "<NuGetSymbolKey>")
parameters.ApiKey |> Option.iter (fun key -> TraceSecrets.register "<NuGetKey>" key)
parameters.SymbolApiKey |> Option.iter (fun key -> TraceSecrets.register "<NuGetSymbolKey>" key)

let pushArgs = parameters |> toPushCliArgs |> Args.toWindowsCommandLine
let args = sprintf "%s \"%s\" %s" options.Command nupkg pushArgs
Expand Down
6 changes: 3 additions & 3 deletions src/app/Fake.DotNet.Paket/Paket.fs
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ let pack setParams =
let pushFiles setParams files =
let parameters : PaketPushParams = PaketPushDefaults() |> setParams

TraceSecrets.register parameters.ApiKey "<PaketApiKey>"
TraceSecrets.register "<PaketApiKey>" parameters.ApiKey
match Environment.environVarOrNone "nugetkey" with
| Some k -> TraceSecrets.register k "<PaketApiKey>"
| Some k -> TraceSecrets.register "<PaketApiKey>" k
| None -> ()
match Environment.environVarOrNone "nuget-key" with
| Some k -> TraceSecrets.register k "<PaketApiKey>"
| Some k -> TraceSecrets.register "<PaketApiKey>" k
| None -> ()

let packages = Seq.toList files
Expand Down