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

[Suggestion] Support for multiple projects with deliverable output #116

Merged
merged 26 commits into from
Mar 5, 2015
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2f11147
Support for multiple projects with deliverable output
Oct 16, 2014
0fa87c4
Fixing failed path
Oct 16, 2014
fc90f53
Added support for interproject dependencies and executables
Oct 17, 2014
669ce37
Merge remote-tracking branch 'upstream/master' into multiproject
Oct 17, 2014
3847785
Getting the correct libdirs
Oct 21, 2014
cf5ce8e
Nuget version formatting now in Paket
Oct 28, 2014
bfe5e39
Merge branch 'master' into multiproject
Oct 29, 2014
ff404ad
Simplifying with all the latest goodness from paket
Oct 30, 2014
23e912a
Merge branch 'master' into multiproject
Nov 20, 2014
482d2bf
Adapting to new domain types of Paket
Nov 20, 2014
382db99
Merge branch 'master' into multiproject
Dec 2, 2014
509543f
Merge branch 'master' into multiproject
Dec 12, 2014
59934d6
Merge branch 'master' into multiproject
Jan 6, 2015
8f85784
Merge branch 'master' into multiproject
Jan 16, 2015
7f9a9a8
Merge branch 'master' into multiproject
Feb 23, 2015
f0a6b5c
Merge branch 'master' into multiproject
Feb 23, 2015
fcbc5fd
Fixing errors after api changes
Feb 25, 2015
21392ea
Merge branch 'master' into multiproject
Feb 26, 2015
e4d793d
Remove redundant nuget code
Feb 26, 2015
df9317f
Merge branch 'fixstackoverflow' into multiproject
Feb 26, 2015
80fb905
Merge remote-tracking branch 'upstream/master' into multiproject
Feb 26, 2015
1efbffc
Fixing casing in bin folder name
Feb 26, 2015
01537a3
Binaries and libdirs made into values in generate.template
Mar 5, 2015
0eec754
Remove redundant Paket.Core reference
Mar 5, 2015
a89baab
use proper path combine functions
Mar 5, 2015
8c3ccbe
More robust function to copy binaries
Mar 5, 2015
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
12 changes: 11 additions & 1 deletion build.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// --------------------------------------------------------------------------------------

#r @"packages/FAKE/tools/FakeLib.dll"

open Fake
open Fake.Git
open Fake.AssemblyInfoFile
Expand Down Expand Up @@ -100,6 +99,16 @@ Target "AssemblyInfo" (fun _ ->
csProjs |> Seq.iter genCSAssemblyInfo
)

// Copies binaries from default VS location to exepcted bin folder
// But keeps a subdirectory structure for each project in the
// src folder to support multiple project outputs
Target "CopyBinaries" (fun _ ->
directoryInfo "src"
|> subDirectories
|> Array.map (fun d -> (d.Name, sprintf "%s/bin/Release" d.FullName))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Path.Combine

|> Array.iter (fun (n, p) -> CopyDir (sprintf "bin/%s" n) p (fun _ -> true))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here please use path.combine or @@

)

// --------------------------------------------------------------------------------------
// Clean build results

Expand Down Expand Up @@ -333,6 +342,7 @@ Target "All" DoNothing
"Clean"
==> "AssemblyInfo"
==> "Build"
==> "CopyBinaries"
==> "RunTests"
=?> ("GenerateReferenceDocs",isLocalBuild)
=?> ("GenerateDocs",isLocalBuild)
Expand Down
21 changes: 14 additions & 7 deletions docs/tools/generate.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// (the generated documentation is stored in the 'docs/output' directory)
// --------------------------------------------------------------------------------------

// Binaries that have XML documentation (in a corresponding generated XML file)
let referenceBinaries = [ "##ProjectName##.dll" ]
// Web site location for the generated documentation
let website = "/##ProjectName##"

Expand Down Expand Up @@ -86,19 +84,28 @@ let references =
|> Some
else None

let binaries =
directoryInfo bin
|> subDirectories
|> Array.map (fun d -> d.FullName @@ (sprintf "%s.dll" d.Name))
|> List.ofArray

let libDirs =
directoryInfo bin
|> subDirectories
|> Array.map (fun d -> d.FullName)
|> List.ofArray

// Build API reference from XML comments
let buildReference () =
CleanDir (output @@ "reference")
let binaries =
referenceBinaries
|> List.map (fun lib-> bin @@ lib)
MetadataFormat.Generate
( binaries, output @@ "reference", layoutRootsAll.["en"],
parameters = ("root", root)::info,
sourceRepo = githubLink @@ "tree/master",
sourceFolder = __SOURCE_DIRECTORY__ @@ ".." @@ "..",
publicOnly = true, libDirs = [bin],
?assemblyReferences = references )
?assemblyReferences = references,
publicOnly = true,libDirs = libDirs )

// Build documentation from `fsx` and `md` files in `docs/content`
let buildDocumentation () =
Expand Down
2 changes: 1 addition & 1 deletion paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ nuget NUnit.Runners
nuget FAKE
nuget SourceLink.Fake

github fsharp/FAKE modules/Octokit/Octokit.fsx
github fsharp/FAKE modules/Octokit/Octokit.fsx
10 changes: 5 additions & 5 deletions src/FSharp.ProjectTemplate/FSharp.ProjectTemplate.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Tailcalls>false</Tailcalls>
<OutputPath>..\..\bin</OutputPath>
<OutputPath>.\bin\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<DocumentationFile>..\..\bin\FSharp.ProjectTemplate.xml</DocumentationFile>
<DocumentationFile>.\bin\Debug\FSharp.ProjectTemplate.xml</DocumentationFile>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be FSharp.ProjectScaffold, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?
The project is named FSharp.ProjectTemplate so I assume the xml docs should have the same name. (Unless I'm completely misunderstanding you question here)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. my question is more: this gets correctly replaced, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes,

from: https://github.com/fsprojects/ProjectScaffold/blob/master/init.fsx#L138

 |> replace projectTemplateName projectName

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<Tailcalls>true</Tailcalls>
<OutputPath>..\..\bin</OutputPath>
<OutputPath>.\bin\Release</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<DocumentationFile>..\..\bin\FSharp.ProjectTemplate.xml</DocumentationFile>
<DocumentationFile>.\bin\Release\FSharp.ProjectTemplate.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
Expand Down Expand Up @@ -72,4 +72,4 @@
</Target>
-->
<Import Project="..\..\.paket\paket.targets" />
</Project>
</Project>