forked from aaronpowell/dotnet-delice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.fsx
40 lines (30 loc) · 908 Bytes
/
build.fsx
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
#load ".fake/build.fsx/intellisense.fsx"
open Fake.Core
open Fake.DotNet
open Fake.IO
open Fake.IO.FileSystemOperators
open Fake.IO.Globbing.Operators
open Fake.Core.TargetOperators
Target.create "Clean" (fun _ ->
!! "src/**/bin"
++ "src/**/obj"
|> Shell.cleanDirs
)
Target.create "Build" (fun _ ->
!! "src/**/*.*proj"
|> Seq.iter (DotNet.build id)
)
Target.create "Changelog" (fun _ ->
let changelog = "CHANGELOG.md" |> Changelog.load
Directory.ensure "./.nupkg"
[|sprintf "%O" changelog.LatestEntry|]
|> File.append "./.nupkg/changelog.md"
let s = sprintf "%O" changelog.LatestEntry
printfn "##vso[task.setvariable variable=packageVersion]%s" changelog.LatestEntry.AssemblyVersion
Templates.replaceInFiles ["@releaseNotes@", s] [ "./src/DotNetDelice/DotNetDelice.fsproj" ]
)
Target.create "All" ignore
"Clean"
==> "Build"
==> "All"
Target.runOrDefault "All"