Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 99
Expand file tree
/
Copy pathBasicTasks.fs
More file actions
Latest commit
81 lines (74 loc) · 2.55 KB
/
Copy pathBasicTasks.fs
File metadata and controls
81 lines (74 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
module BasicTasks
openBlackFox.Fake
openFake.IO
openFake.DotNet
openFake.IO.Globbing.Operators
openProjectInfo
/// Buildtask for setting a prerelease tag (also sets the mutable isPrerelease to true, and the PackagePrereleaseTag of all project infos accordingly.)
letsetPrereleaseTag=
BuildTask.create "SetPrereleaseTag"[]{
printfn "Please enter pre-release package suffix"
letsuffix= System.Console.ReadLine()
prereleaseSuffix <- suffix
isPrerelease <-true
projects
|> List.iter (fun p ->
p.PackagePrereleaseTag <-(sprintf "%s-%s" p.PackageVersionTag suffix)
)
//
prereleaseTag <-(sprintf "%s-%s" CoreProject.PackageVersionTag suffix)
}
/// cleans the bin, obj/obj dir of all projects and test projects, as well as the pkg dir.
letclean=
BuildTask.create "Clean"[]{
!!"src/**/bin"++"src/**/obj"++"tests/**/bin"++"tests/**/obj"++"pkg"|> Shell.cleanDirs
}
/// builds the solution file (dotnet build solution.sln)
letbuildSolution=
BuildTask.create "BuildSolution"[ clean ]{
solutionFile
|> DotNet.build (fun p ->
letmsBuildParams=
{p.MSBuildParams with
Properties =([
"warnon","3390"
])
DisableInternalBinLog =true
}
{
p with
MSBuildParams = msBuildParams
}
|> DotNet.Options.withCustomParams (Some "-tl")
)
}
/// builds the individual project files (dotnet build project.*proj)
///
/// The following MSBuild params are set for each project accordingly to the respective ProjectInfo:
///
/// - AssemblyVersion
///
/// - AssemblyInformationalVersion
letbuild= BuildTask.create "Build"[clean]{
projects
|> List.iter (fun pInfo ->
letproj= pInfo.ProjFile
proj
|> DotNet.build (fun p ->
letmsBuildParams=
{p.MSBuildParams with
Properties =([
"AssemblyVersion", pInfo.AssemblyVersion
"InformationalVersion", pInfo.AssemblyInformationalVersion
"warnon","3390"
])
DisableInternalBinLog =true
}
{
p with
MSBuildParams = msBuildParams
}
|> DotNet.Options.withCustomParams (Some "--no-dependencies -tl")
)
)
}