Skip to content

Commit b612328

Browse files
committed
Use Paket's group feature
1 parent 9635c53 commit b612328

File tree

9 files changed

+58
-43
lines changed

9 files changed

+58
-43
lines changed

build.cmd

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ if errorlevel 1 (
1313

1414
IF NOT EXIST build.fsx (
1515
.paket\paket.exe update
16-
packages\FAKE\tools\FAKE.exe init.fsx
16+
packages\build\FAKE\tools\FAKE.exe init.fsx
1717
)
18-
packages\FAKE\tools\FAKE.exe build.fsx %*
18+
packages\build\FAKE\tools\FAKE.exe build.fsx %*

build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ run .paket/paket.exe restore
3333

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

build.template

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// --------------------------------------------------------------------------------------
1+
// --------------------------------------------------------------------------------------
22
// FAKE build script
33
// --------------------------------------------------------------------------------------
44

5-
#r @"packages/FAKE/tools/FakeLib.dll"
5+
#r @"packages/build/FAKE/tools/FakeLib.dll"
66
open Fake
77
open Fake.Git
88
open Fake.AssemblyInfoFile
@@ -12,7 +12,7 @@ open System
1212
open System.IO
1313
#if MONO
1414
#else
15-
#load "packages/SourceLink.Fake/tools/Fake.fsx"
15+
#load "packages/build/SourceLink.Fake/tools/Fake.fsx"
1616
open SourceLink
1717
#endif
1818

@@ -98,9 +98,9 @@ Target "AssemblyInfo" (fun _ ->
9898
|> Seq.map getProjectDetails
9999
|> Seq.iter (fun (projFileName, projectName, folderName, attributes) ->
100100
match projFileName with
101-
| Fsproj -> CreateFSharpAssemblyInfo (folderName @@ "AssemblyInfo.fs") attributes
102-
| Csproj -> CreateCSharpAssemblyInfo ((folderName @@ "Properties") @@ "AssemblyInfo.cs") attributes
103-
| Vbproj -> CreateVisualBasicAssemblyInfo ((folderName @@ "My Project") @@ "AssemblyInfo.vb") attributes
101+
| Fsproj -> CreateFSharpAssemblyInfo (folderName </> "AssemblyInfo.fs") attributes
102+
| Csproj -> CreateCSharpAssemblyInfo ((folderName </> "Properties") </> "AssemblyInfo.cs") attributes
103+
| Vbproj -> CreateVisualBasicAssemblyInfo ((folderName </> "My Project") </> "AssemblyInfo.vb") attributes
104104
| Shproj -> ()
105105
)
106106
)
@@ -111,7 +111,7 @@ Target "AssemblyInfo" (fun _ ->
111111
Target "CopyBinaries" (fun _ ->
112112
!! "src/**/*.??proj"
113113
-- "src/**/*.shproj"
114-
|> Seq.map (fun f -> ((System.IO.Path.GetDirectoryName f) @@ "bin/Release", "bin" @@ (System.IO.Path.GetFileNameWithoutExtension f)))
114+
|> Seq.map (fun f -> ((System.IO.Path.GetDirectoryName f) </> "bin/Release", "bin" </> (System.IO.Path.GetFileNameWithoutExtension f)))
115115
|> Seq.iter (fun (fromDir, toDir) -> CopyDir toDir fromDir (fun _ -> true))
116116
)
117117

@@ -187,7 +187,7 @@ Target "PublishNuget" (fun _ ->
187187
// Generate the documentation
188188

189189

190-
let fakePath = "packages" @@ "FAKE" @@ "tools" @@ "FAKE.exe"
190+
let fakePath = "packages" </> "build" </> "FAKE" </> "tools" </> "FAKE.exe"
191191
let fakeStartInfo script workingDirectory args fsiargs environmentVars =
192192
(fun (info: System.Diagnostics.ProcessStartInfo) ->
193193
info.FileName <- System.IO.Path.GetFullPath fakePath
@@ -285,8 +285,8 @@ F# Project Scaffold ({0})
285285
=========================
286286
*)
287287
"""
288-
let targetDir = "docs/content" @@ lang
289-
let targetFile = targetDir @@ "index.fsx"
288+
let targetDir = "docs/content" </> lang
289+
let targetFile = targetDir </> "index.fsx"
290290
ensureDirectory targetDir
291291
System.IO.File.WriteAllText(targetFile, System.String.Format(content, lang))
292292

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

303303
let templateFileName = "template.cshtml"
304304
let templateDir = "docs/tools/templates"
305-
let langTemplateDir = templateDir @@ lang
306-
let langTemplateFileName = langTemplateDir @@ templateFileName
305+
let langTemplateDir = templateDir </> lang
306+
let langTemplateFileName = langTemplateDir </> templateFileName
307307

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

311311
ensureDirectory langTemplateDir
312-
Copy langTemplateDir [ templateDir @@ templateFileName ]
312+
Copy langTemplateDir [ templateDir </> templateFileName ]
313313

314314
createIndexFsx lang)
315315
)
@@ -328,7 +328,7 @@ Target "ReleaseDocs" (fun _ ->
328328
Branches.push tempDocsDir
329329
)
330330

331-
#load "paket-files/fsharp/FAKE/modules/Octokit/Octokit.fsx"
331+
#load "paket-files/build/fsharp/FAKE/modules/Octokit/Octokit.fsx"
332332
open Octokit
333333

334334
Target "Release" (fun _ ->

docs/tools/generate.template

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ let info =
2727
// For typical project, no changes are needed below
2828
// --------------------------------------------------------------------------------------
2929

30-
#load "../../packages/FSharp.Formatting/FSharp.Formatting.fsx"
31-
#I "../../packages/FAKE/tools/"
30+
#load "../../packages/build/FSharp.Formatting/FSharp.Formatting.fsx"
31+
#I "../../packages/build/FAKE/tools/"
3232
#r "NuGet.Core.dll"
3333
#r "FakeLib.dll"
3434
open Fake
@@ -51,7 +51,7 @@ let content = __SOURCE_DIRECTORY__ @@ "../content"
5151
let output = __SOURCE_DIRECTORY__ @@ "../output"
5252
let files = __SOURCE_DIRECTORY__ @@ "../files"
5353
let templates = __SOURCE_DIRECTORY__ @@ "templates"
54-
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/FSharp.Formatting/"
54+
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/build/FSharp.Formatting/"
5555
let docTemplate = "docpage.cshtml"
5656

5757
// Where to look for *.csproj templates (in this order)

init.fsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#r @"packages/FAKE/tools/FakeLib.dll"
1+
#r @"packages/build/FAKE/tools/FakeLib.dll"
22
open Fake
33
open System
44
open System.IO

paket.dependencies

+13-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
source https://nuget.org/api/v2
22

3-
nuget FSharp.Formatting
4-
nuget NUnit ~> 2
5-
nuget NUnit.Runners ~> 2
6-
nuget FAKE
7-
nuget SourceLink.Fake
3+
group Build
4+
source https://nuget.org/api/v2
5+
6+
nuget SourceLink.Fake
7+
nuget FAKE
8+
nuget FSharp.Formatting
89

9-
github fsharp/FAKE modules/Octokit/Octokit.fsx
10+
github fsharp/FAKE modules/Octokit/Octokit.fsx
11+
12+
group Test
13+
source https://nuget.org/api/v2
14+
15+
nuget NUnit ~> 2
16+
nuget NUnit.Runners ~> 2

paket.lock

+22-15
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
1+
2+
3+
GROUP Build
14
NUGET
2-
remote: https://nuget.org/api/v2
5+
remote: https://www.nuget.org/api/v2
36
specs:
4-
FAKE (3.28.7)
5-
FSharp.Compiler.Service (0.0.89)
6-
FSharp.Formatting (2.9.0)
7-
FSharp.Compiler.Service (>= 0.0.87)
8-
FSharpVSPowerTools.Core (1.8.0)
9-
FSharpVSPowerTools.Core (1.8.0)
10-
FSharp.Compiler.Service (>= 0.0.87)
7+
FAKE (4.12.0)
8+
FSharp.Compiler.Service (1.4.2.3)
9+
FSharp.Formatting (2.12.1)
10+
FSharp.Compiler.Service (>= 1.4.2 < 1.5.0)
11+
FSharpVSPowerTools.Core (>= 2.2.0 < 2.3.0)
12+
FSharpVSPowerTools.Core (2.2.0)
13+
FSharp.Compiler.Service (>= 1.4.2.0)
1114
Microsoft.Bcl (1.1.10)
1215
Microsoft.Bcl.Build (>= 1.0.14)
13-
Microsoft.Bcl.Build (1.0.21)
16+
Microsoft.Bcl.Build (1.0.21) - import_targets: false
1417
Microsoft.Net.Http (2.2.29)
1518
Microsoft.Bcl (>= 1.1.10)
1619
Microsoft.Bcl.Build (>= 1.0.14)
17-
NUnit (2.6.4)
18-
NUnit.Runners (2.6.4)
19-
Octokit (0.9.0)
20+
Octokit (0.17.0)
2021
Microsoft.Net.Http
21-
SourceLink.Fake (1.0.0)
22+
SourceLink.Fake (1.1.0)
2223
GITHUB
2324
remote: fsharp/FAKE
2425
specs:
25-
modules/Octokit/Octokit.fsx (76860b263d113e9a127c538ecf146e4ce35c4c27)
26-
Octokit
26+
modules/Octokit/Octokit.fsx (7d1a6f8e48d1e2e1e3246ea24a4de05cccc8ce64)
27+
Octokit
28+
GROUP Test
29+
NUGET
30+
remote: https://www.nuget.org/api/v2
31+
specs:
32+
NUnit (2.6.4)
33+
NUnit.Runners (2.6.4)

tests/FSharp.ProjectTemplate.Tests/FSharp.ProjectTemplate.Tests.fsproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
<Import Project="..\..\.paket\paket.targets" />
8585
<ItemGroup>
8686
<Reference Include="nunit.framework">
87-
<HintPath>..\..\packages\NUnit\lib\nunit.framework.dll</HintPath>
87+
<HintPath>..\..\packages\test\NUnit\lib\nunit.framework.dll</HintPath>
8888
<Private>True</Private>
8989
<Paket>True</Paket>
9090
</Reference>
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
group Test
12
NUnit
23
NUnit.Runners

0 commit comments

Comments
 (0)