Skip to content

Commit

Permalink
Merge pull request #854 from amazingant/master
Browse files Browse the repository at this point in the history
Add BuildConfig/TemplateFile options to PaketHelper's Pack command
  • Loading branch information
forki committed Jul 13, 2015
2 parents f36742b + 37305ec commit c0862ba
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/app/FakeLib/PaketHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ type PaketPackParams =
TimeOut : TimeSpan
Version : string
ReleaseNotes : string
BuildConfig : string
TemplateFile : string
WorkingDir : string
OutputPath : string }

Expand All @@ -21,6 +23,8 @@ let PaketPackDefaults() : PaketPackParams =
TimeOut = TimeSpan.FromMinutes 5.
Version = null
ReleaseNotes = null
BuildConfig = null
TemplateFile = null
WorkingDir = "."
OutputPath = "./temp" }

Expand Down Expand Up @@ -58,12 +62,14 @@ let Pack setParams =

let version = if String.IsNullOrWhiteSpace parameters.Version then "" else " version " + toParam parameters.Version
let releaseNotes = if String.IsNullOrWhiteSpace parameters.ReleaseNotes then "" else " releaseNotes " + toParam (xmlEncode parameters.ReleaseNotes)
let buildConfig = if String.IsNullOrWhiteSpace parameters.BuildConfig then "" else " buildconfig " + toParam parameters.BuildConfig
let templateFile = if String.IsNullOrWhiteSpace parameters.TemplateFile then "" else " templatefile " + toParam parameters.TemplateFile

let packResult =
ExecProcess
(fun info ->
info.FileName <- parameters.ToolPath
info.Arguments <- sprintf "pack output %s%s%s" parameters.OutputPath version releaseNotes) parameters.TimeOut
info.Arguments <- sprintf "pack output %s%s%s%s%s" parameters.OutputPath version releaseNotes buildConfig templateFile) parameters.TimeOut

if packResult <> 0 then failwithf "Error during packing %s." parameters.WorkingDir
traceEndTask "PaketPack" parameters.WorkingDir
Expand Down

0 comments on commit c0862ba

Please sign in to comment.