Skip to content

Commit

Permalink
Merge pull request #198 from LoopPerfect/bugfix/top-level-buckaroo-se…
Browse files Browse the repository at this point in the history
…ction

bugfix/top-level-buckaroo-section
  • Loading branch information
njlr authored Dec 7, 2018
2 parents 37f3365 + 6e310a2 commit 141007b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions buckaroo/InstallCommand.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ open System
open System.IO
open Buckaroo.PackageLocation
open Buckaroo.BuckConfig
open FSharpx.Control

let private fetchManifestFromLock (lock : Lock) (sourceExplorer : ISourceExplorer) (package : PackageIdentifier) = async {
let location =
Expand Down Expand Up @@ -337,8 +338,26 @@ let writeTopLevelFiles (context : Tasks.TaskContext) (root : string) (lock : Loc
)
|> Map.ofSeq

let buckarooSection =
lock.Packages
|> Map.toSeq
|> Seq.map (fun (k, _) -> (PackageIdentifier.show k, INIString (computeCellIdentifier [] k)))
|> Seq.append [
(
"dependencies",
(
lock.Dependencies
|> Seq.map (fun d -> (computeCellIdentifier [] d.Package) + (Target.show d.Target))
|> String.concat " "
|> INIString
)
);
]
|> Map.ofSeq

let config =
Map.empty
|> Map.add "buckaroo" buckarooSection
|> Map.add "repositories" repositoriesSection

do! Files.mkdirp (Path.Combine(root, ".buckconfig.d"))
Expand Down

0 comments on commit 141007b

Please sign in to comment.