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

Add BuildConfig/TemplateFile options to PaketHelper's Pack command #854

Merged
merged 1 commit into from
Jul 13, 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: 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