forked from Zaid-Ajaj/Fable.Mocha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.fsx
80 lines (70 loc) · 2.25 KB
/
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
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
#if INTERACTIVE
#r "nuget: FAKE.Core"
#r "nuget: Fake.Core.Target"
#r "nuget: Fake.IO.FileSystem"
#r "nuget: Fake.Tools.Git"
#r "nuget: Fake.DotNet.Cli"
#r "nuget: Fake.DotNet.AssemblyInfoFile"
#r "nuget: Fake.DotNet.Paket"
#r "nuget: Paket.Core"
#else
#r "paket:
nuget FSharp.Core 5.0.0
nuget FAKE.Core
nuget Fake.Core.Target
nuget Fake.IO.FileSystem
nuget Fake.Tools.Git
nuget Fake.DotNet.Cli
nuget Fake.DotNet.AssemblyInfoFile
nuget Fake.DotNet.Paket
nuget Paket.Core prerelease //"
#endif
#load "paket-files/wsbuild/github.com/dotnet-websharper/build-script/WebSharper.Fake.fsx"
open WebSharper.Fake
open Fake.DotNet
open Fake.Core
open Fake.Core.TargetOperators
let WithProjects projects args =
{ args with BuildAction = Projects projects }
Target.create "PrePackaging" <| fun _ ->
let template = """type file
id WebSharper.Fable.Mocha
authors IntelliFactory
projectUrl https://websharper.com/
repositoryType git
repositoryUrl https://github.com/dotnet-websharper/WebSharper.Fable.Mocha/
licenseUrl https://github.com/dotnet-websharper/WebSharper.Fable.Mocha/blob/master/LICENSE.md
iconUrl https://github.com/dotnet-websharper/core/raw/websharper50/tools/WebSharper.png
description
WebSharper Proxy for Fable's Browser.%TEMP%
tags
WebSharper Fable FSharp CSharp JavaScript WebAPI %TEMP%
dependencies
framework: netstandard2.0
WebSharper ~> LOCKEDVERSION:[3]
Fable.Mocha == 2.17.0
files
../websharper/WebSharper.Fable.Mocha/bin/Release/netstandard2.0/WebSharper.Fable.Mocha.dll ==> lib/netstandard2.0
references
WebSharper.Fable.Mocha.dll
"""
System.IO.Directory.CreateDirectory "nuget"
System.IO.File.WriteAllText(sprintf "nuget/WebSharper.Fable.Mocha.paket.template", template)
let targets =
LazyVersionFrom "WebSharper" |> WSTargets.Default
|> fun args ->
{ args with
Attributes = [
AssemblyInfo.Company "IntelliFactory"
AssemblyInfo.Copyright "(c) IntelliFactory 2023"
AssemblyInfo.Title "https://github.com/dotnet-websharper/WebSharper.Fable.Mocha"
AssemblyInfo.Product "WebSharper Browser"
]
}
|> WithProjects [
"WebSharper.sln"
]
|> MakeTargets
"PrePackaging" ==> "WS-Package"
targets
|> RunTargets