-
Notifications
You must be signed in to change notification settings - Fork 99
/
Copy pathPackageTasks.fs
69 lines (62 loc) · 2.17 KB
/
PackageTasks.fs
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
module PackageTasks
open ProjectInfo
open MessagePrompts
open BasicTasks
open TestTasks
open BlackFox.Fake
open Fake.Core
open Fake.IO.Globbing.Operators
let pack =
BuildTask.create "Pack" [ clean; build; runTests ] {
if promptYesNo (sprintf "creating stable package with version %s OK?" stableVersionTag) then
!! "src/**/*.*proj" -- "src/bin/*"
|> Seq.iter (
Fake.DotNet.DotNet.pack (fun p ->
let msBuildParams =
{ p.MSBuildParams with
Properties =
([
"Version", stableVersionTag
"PackageReleaseNotes", (release.Notes |> String.concat "\r\n")
]
@ p.MSBuildParams.Properties)
}
{ p with
MSBuildParams = msBuildParams
OutputPath = Some pkgDir
})
)
else
failwith "aborted"
}
let packPrerelease =
BuildTask.create
"PackPrerelease"
[
setPrereleaseTag
clean
build
runTests
] {
if promptYesNo (sprintf "package tag will be %s OK?" prereleaseTag) then
!! "src/**/*.*proj" -- "src/bin/*"
|> Seq.iter (
Fake.DotNet.DotNet.pack (fun p ->
let msBuildParams =
{ p.MSBuildParams with
Properties =
([
"Version", prereleaseTag
"PackageReleaseNotes", (release.Notes |> String.toLines)
]
@ p.MSBuildParams.Properties)
}
{ p with
VersionSuffix = Some prereleaseSuffix
OutputPath = Some pkgDir
MSBuildParams = msBuildParams
})
)
else
failwith "aborted"
}