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 lock-dependencies parameter to Paket.Pack #876

Merged
merged 3 commits into from
Jul 23, 2015
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#ignore thumbnails created by windows
Thumbs.db
.DS_Store
#Ignore files build by Visual Studio
docs/
docsBuild/
Expand Down
8 changes: 6 additions & 2 deletions src/app/FakeLib/PaketHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type PaketPackParams =
{ ToolPath : string
TimeOut : TimeSpan
Version : string
LockDependencies : bool
ReleaseNotes : string
BuildConfig : string
TemplateFile : string
Expand All @@ -22,6 +23,7 @@ let PaketPackDefaults() : PaketPackParams =
{ ToolPath = (findToolFolderInSubPath "paket.exe" (currentDirectory @@ ".paket")) @@ "paket.exe"
TimeOut = TimeSpan.FromMinutes 5.
Version = null
LockDependencies = false
ReleaseNotes = null
BuildConfig = null
TemplateFile = null
Expand Down Expand Up @@ -64,12 +66,14 @@ let Pack setParams =
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 lockDependencies = if parameters.LockDependencies then " lock-dependencies" else ""

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

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