Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set PaketHelper ApiKey #664

Merged
merged 1 commit into from
Feb 24, 2015
Merged
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
8 changes: 5 additions & 3 deletions src/app/FakeLib/PaketHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ type PaketPushParams =
TimeOut : TimeSpan
PublishUrl : string
WorkingDir : string
AccessKey : string }
ApiKey : string }

/// Paket push default parameters
let PaketPushDefaults() : PaketPushParams =
{ ToolPath = (findToolFolderInSubPath "paket.exe" (currentDirectory @@ ".paket")) @@ "paket.exe"
TimeOut = TimeSpan.FromMinutes 5.
PublishUrl = "https://nuget.org"
WorkingDir = "."
AccessKey = null }
ApiKey = null }

/// Creates a new NuGet package by using Paket pack on all paket.template files in the working directory.
/// ## Parameters
Expand Down Expand Up @@ -77,6 +77,8 @@ let Push setParams =
let pushResult =
ExecProcess (fun info ->
info.FileName <- parameters.ToolPath
info.Arguments <- sprintf "push url %s file %s" parameters.PublishUrl package) System.TimeSpan.MaxValue
info.Arguments <- sprintf "push url %s file %s" parameters.PublishUrl package
if parameters.ApiKey <> null then
info.Arguments <- sprintf "%s apikey %s" info.Arguments parameters.ApiKey) System.TimeSpan.MaxValue
if pushResult <> 0 then failwithf "Error during pushing %s." package
traceEndTask "PaketPush" (separated ", " packages)