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

NuGet: support fallback framework groups #514

Merged
merged 1 commit into from
Aug 4, 2014
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
14 changes: 8 additions & 6 deletions src/app/FakeLib/NuGet/NugetHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,18 @@ let private createNuspecFile parameters nuSpec =
|> FullName
tracefn "Creating .nuspec file at %s" specFile
fi.CopyTo(specFile, true) |> ignore
let getFrameworkGroup (frameworkTags : (string * string) seq) =

let getFrameworkGroup (frameworkTags : (string * string) seq) =
frameworkTags
|> Seq.map
(fun (frameworkVersion, tags) -> sprintf "<group targetFramework=\"%s\">%s</group>" frameworkVersion tags)
|> Seq.map (fun (frameworkVersion, tags) ->
if isNullOrEmpty frameworkVersion then sprintf "<group>%s</group>" tags
else sprintf "<group targetFramework=\"%s\">%s</group>" frameworkVersion tags)
|> toLines
let getGroup items toTags =

let getGroup items toTags =
if items = [] then ""
else sprintf "<group>%s</group>" (items |> toTags)

let getReferencesTags references =
references
|> Seq.map (fun assembly -> sprintf "<reference file=\"%s\" />" assembly)
Expand Down