Skip to content

Commit

Permalink
Use Paket's group feature
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Dec 29, 2015
1 parent 9635c53 commit b612328
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 43 deletions.
4 changes: 2 additions & 2 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ if errorlevel 1 (

IF NOT EXIST build.fsx (
.paket\paket.exe update
packages\FAKE\tools\FAKE.exe init.fsx
packages\build\FAKE\tools\FAKE.exe init.fsx
)
packages\FAKE\tools\FAKE.exe build.fsx %*
packages\build\FAKE\tools\FAKE.exe build.fsx %*
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ run .paket/paket.exe restore

[ ! -e build.fsx ] && run .paket/paket.exe update
[ ! -e build.fsx ] && run packages/FAKE/tools/FAKE.exe init.fsx
run packages/FAKE/tools/FAKE.exe "$@" $FSIARGS build.fsx
run packages/build/FAKE/tools/FAKE.exe "$@" $FSIARGS build.fsx

28 changes: 14 additions & 14 deletions build.template
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// --------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------
// FAKE build script
// --------------------------------------------------------------------------------------

#r @"packages/FAKE/tools/FakeLib.dll"
#r @"packages/build/FAKE/tools/FakeLib.dll"
open Fake
open Fake.Git
open Fake.AssemblyInfoFile
Expand All @@ -12,7 +12,7 @@ open System
open System.IO
#if MONO
#else
#load "packages/SourceLink.Fake/tools/Fake.fsx"
#load "packages/build/SourceLink.Fake/tools/Fake.fsx"
open SourceLink
#endif

Expand Down Expand Up @@ -98,9 +98,9 @@ Target "AssemblyInfo" (fun _ ->
|> Seq.map getProjectDetails
|> Seq.iter (fun (projFileName, projectName, folderName, attributes) ->
match projFileName with
| Fsproj -> CreateFSharpAssemblyInfo (folderName @@ "AssemblyInfo.fs") attributes
| Csproj -> CreateCSharpAssemblyInfo ((folderName @@ "Properties") @@ "AssemblyInfo.cs") attributes
| Vbproj -> CreateVisualBasicAssemblyInfo ((folderName @@ "My Project") @@ "AssemblyInfo.vb") attributes
| Fsproj -> CreateFSharpAssemblyInfo (folderName </> "AssemblyInfo.fs") attributes
| Csproj -> CreateCSharpAssemblyInfo ((folderName </> "Properties") </> "AssemblyInfo.cs") attributes
| Vbproj -> CreateVisualBasicAssemblyInfo ((folderName </> "My Project") </> "AssemblyInfo.vb") attributes
| Shproj -> ()
)
)
Expand All @@ -111,7 +111,7 @@ Target "AssemblyInfo" (fun _ ->
Target "CopyBinaries" (fun _ ->
!! "src/**/*.??proj"
-- "src/**/*.shproj"
|> Seq.map (fun f -> ((System.IO.Path.GetDirectoryName f) @@ "bin/Release", "bin" @@ (System.IO.Path.GetFileNameWithoutExtension f)))
|> Seq.map (fun f -> ((System.IO.Path.GetDirectoryName f) </> "bin/Release", "bin" </> (System.IO.Path.GetFileNameWithoutExtension f)))
|> Seq.iter (fun (fromDir, toDir) -> CopyDir toDir fromDir (fun _ -> true))
)

Expand Down Expand Up @@ -187,7 +187,7 @@ Target "PublishNuget" (fun _ ->
// Generate the documentation


let fakePath = "packages" @@ "FAKE" @@ "tools" @@ "FAKE.exe"
let fakePath = "packages" </> "build" </> "FAKE" </> "tools" </> "FAKE.exe"
let fakeStartInfo script workingDirectory args fsiargs environmentVars =
(fun (info: System.Diagnostics.ProcessStartInfo) ->
info.FileName <- System.IO.Path.GetFullPath fakePath
Expand Down Expand Up @@ -285,8 +285,8 @@ F# Project Scaffold ({0})
=========================
*)
"""
let targetDir = "docs/content" @@ lang
let targetFile = targetDir @@ "index.fsx"
let targetDir = "docs/content" </> lang
let targetFile = targetDir </> "index.fsx"
ensureDirectory targetDir
System.IO.File.WriteAllText(targetFile, System.String.Format(content, lang))

Expand All @@ -302,14 +302,14 @@ Target "AddLangDocs" (fun _ ->

let templateFileName = "template.cshtml"
let templateDir = "docs/tools/templates"
let langTemplateDir = templateDir @@ lang
let langTemplateFileName = langTemplateDir @@ templateFileName
let langTemplateDir = templateDir </> lang
let langTemplateFileName = langTemplateDir </> templateFileName

if System.IO.File.Exists(langTemplateFileName) then
failwithf "Documents for specified language '%s' have already been added." lang

ensureDirectory langTemplateDir
Copy langTemplateDir [ templateDir @@ templateFileName ]
Copy langTemplateDir [ templateDir </> templateFileName ]

createIndexFsx lang)
)
Expand All @@ -328,7 +328,7 @@ Target "ReleaseDocs" (fun _ ->
Branches.push tempDocsDir
)

#load "paket-files/fsharp/FAKE/modules/Octokit/Octokit.fsx"
#load "paket-files/build/fsharp/FAKE/modules/Octokit/Octokit.fsx"
open Octokit

Target "Release" (fun _ ->
Expand Down
6 changes: 3 additions & 3 deletions docs/tools/generate.template
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ let info =
// For typical project, no changes are needed below
// --------------------------------------------------------------------------------------

#load "../../packages/FSharp.Formatting/FSharp.Formatting.fsx"
#I "../../packages/FAKE/tools/"
#load "../../packages/build/FSharp.Formatting/FSharp.Formatting.fsx"
#I "../../packages/build/FAKE/tools/"
#r "NuGet.Core.dll"
#r "FakeLib.dll"
open Fake
Expand All @@ -51,7 +51,7 @@ let content = __SOURCE_DIRECTORY__ @@ "../content"
let output = __SOURCE_DIRECTORY__ @@ "../output"
let files = __SOURCE_DIRECTORY__ @@ "../files"
let templates = __SOURCE_DIRECTORY__ @@ "templates"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/FSharp.Formatting/"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/build/FSharp.Formatting/"
let docTemplate = "docpage.cshtml"

// Where to look for *.csproj templates (in this order)
Expand Down
2 changes: 1 addition & 1 deletion init.fsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#r @"packages/FAKE/tools/FakeLib.dll"
#r @"packages/build/FAKE/tools/FakeLib.dll"
open Fake
open System
open System.IO
Expand Down
19 changes: 13 additions & 6 deletions paket.dependencies
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
source https://nuget.org/api/v2

nuget FSharp.Formatting
nuget NUnit ~> 2
nuget NUnit.Runners ~> 2
nuget FAKE
nuget SourceLink.Fake
group Build
source https://nuget.org/api/v2

nuget SourceLink.Fake
nuget FAKE
nuget FSharp.Formatting

github fsharp/FAKE modules/Octokit/Octokit.fsx
github fsharp/FAKE modules/Octokit/Octokit.fsx

group Test
source https://nuget.org/api/v2

nuget NUnit ~> 2
nuget NUnit.Runners ~> 2
37 changes: 22 additions & 15 deletions paket.lock
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@


GROUP Build
NUGET
remote: https://nuget.org/api/v2
remote: https://www.nuget.org/api/v2
specs:
FAKE (3.28.7)
FSharp.Compiler.Service (0.0.89)
FSharp.Formatting (2.9.0)
FSharp.Compiler.Service (>= 0.0.87)
FSharpVSPowerTools.Core (1.8.0)
FSharpVSPowerTools.Core (1.8.0)
FSharp.Compiler.Service (>= 0.0.87)
FAKE (4.12.0)
FSharp.Compiler.Service (1.4.2.3)
FSharp.Formatting (2.12.1)
FSharp.Compiler.Service (>= 1.4.2 < 1.5.0)
FSharpVSPowerTools.Core (>= 2.2.0 < 2.3.0)
FSharpVSPowerTools.Core (2.2.0)
FSharp.Compiler.Service (>= 1.4.2.0)
Microsoft.Bcl (1.1.10)
Microsoft.Bcl.Build (>= 1.0.14)
Microsoft.Bcl.Build (1.0.21)
Microsoft.Bcl.Build (1.0.21) - import_targets: false
Microsoft.Net.Http (2.2.29)
Microsoft.Bcl (>= 1.1.10)
Microsoft.Bcl.Build (>= 1.0.14)
NUnit (2.6.4)
NUnit.Runners (2.6.4)
Octokit (0.9.0)
Octokit (0.17.0)
Microsoft.Net.Http
SourceLink.Fake (1.0.0)
SourceLink.Fake (1.1.0)
GITHUB
remote: fsharp/FAKE
specs:
modules/Octokit/Octokit.fsx (76860b263d113e9a127c538ecf146e4ce35c4c27)
Octokit
modules/Octokit/Octokit.fsx (7d1a6f8e48d1e2e1e3246ea24a4de05cccc8ce64)
Octokit
GROUP Test
NUGET
remote: https://www.nuget.org/api/v2
specs:
NUnit (2.6.4)
NUnit.Runners (2.6.4)
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<Import Project="..\..\.paket\paket.targets" />
<ItemGroup>
<Reference Include="nunit.framework">
<HintPath>..\..\packages\NUnit\lib\nunit.framework.dll</HintPath>
<HintPath>..\..\packages\test\NUnit\lib\nunit.framework.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
Expand Down
1 change: 1 addition & 0 deletions tests/FSharp.ProjectTemplate.Tests/paket.references
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
group Test
NUnit
NUnit.Runners

0 comments on commit b612328

Please sign in to comment.