forked from Micha-kun/WebForms.vNextinator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build.fsx
139 lines (118 loc) · 4.96 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// include Fake lib
#r @"packages\FAKE\tools\FakeLib.dll"
open Fake
open Fake.AssemblyInfoFile
// Properties
let buildDir = "./build/"
let packagingRoot = "./package/"
let packagingDir = packagingRoot @@ "lib"
let authors = ["Michael-Jorge Gómez Campos"]
let projectName = "WebForms.vNextinator"
let projectDescription= "The future of WebForms is here!!"
let projectVersion = "0.4.4.0"
let projectSummary = """
Global:
- Some fixes.
.Net 4.6:
- Added version."""
// Targets
Target "BuildClean" (fun _ ->
CleanDir buildDir
)
Target "CopyWebConfigTransform" (fun _ ->
CopyFileIntoSubFolder buildDir "web.config.transform"
)
let generateAssemblyAttributes guid =
[Attribute.Title projectName
Attribute.Description projectDescription
Attribute.Guid guid
Attribute.Product projectName
Attribute.Version projectVersion
Attribute.FileVersion projectVersion
Attribute.CLSCompliant true
Attribute.ComVisible false]
Target "BuildNet20Project" (fun _ ->
generateAssemblyAttributes "ab47c848-139c-4120-ad73-9570ba612160"
|> CreateCSharpAssemblyInfo "Src/WebForms.vNextinator.Net20/Properties/AssemblyInfo.cs"
!! "Src/WebForms.vNextinator.Net20/*.csproj"
|> MSBuildRelease (buildDir + "Net20/") "Build"
|> Log "AppBuild-Output: "
)
Target "BuildNet35Project" (fun _ ->
generateAssemblyAttributes "16ab937c-58b7-41eb-806e-2101894d8bb3"
|> CreateCSharpAssemblyInfo "Src/WebForms.vNextinator.Net35/Properties/AssemblyInfo.cs"
!! "Src/WebForms.vNextinator.Net35/*.csproj"
|> MSBuildRelease (buildDir + "Net35/") "Build"
|> Log "AppBuild-Output: "
)
Target "BuildNet40Project" (fun _ ->
generateAssemblyAttributes "c92237ff-8875-47f9-86ed-9c0c6cf6cca2"
|> CreateCSharpAssemblyInfo "Src/WebForms.vNextinator.Net40/Properties/AssemblyInfo.cs"
!! "Src/WebForms.vNextinator.Net40/*.csproj"
|> MSBuildRelease (buildDir + "Net40/") "Build"
|> Log "AppBuild-Output: "
)
Target "BuildNet45Project" (fun _ ->
generateAssemblyAttributes "1aa18ad4-ed25-4220-b504-e62104855800"
|> CreateCSharpAssemblyInfo "Src/WebForms.vNextinator.Net45/Properties/AssemblyInfo.cs"
!! "Src/WebForms.vNextinator.Net45/*.csproj"
|> MSBuildRelease (buildDir + "Net45/") "Build"
|> Log "AppBuild-Output: "
)
Target "BuildNet46Project" (fun _ ->
generateAssemblyAttributes "71d02e20-938e-415a-ae0c-7bf5c57299dd"
|> CreateCSharpAssemblyInfo "Src/WebForms.vNextinator.Net46/Properties/AssemblyInfo.cs"
!! "Src/WebForms.vNextinator.Net46/*.csproj"
|> MSBuildRelease (buildDir + "Net46/") "Build"
|> Log "AppBuild-Output: "
)
Target "CreatePackage" (fun _ ->
NuGet (fun p ->
{p with
Authors = authors
Project = projectName
Title = projectName
Description = projectDescription
OutputPath = buildDir
Summary = projectSummary
WorkingDir = buildDir
Version = projectVersion
AccessKey = getBuildParamOrDefault "nugetkey" ""
Publish = hasBuildParam "nugetKey"
DependenciesByFramework =
[
{Dependencies = [("TaskParallelLibrary","1.0.2856.0")]; FrameworkVersion = "net35"}
{Dependencies = []; FrameworkVersion = "net40"}
]
FrameworkAssemblies =
[{FrameworkVersions = []; AssemblyName = "System.Web"}]
Files =
[("Net20/WebForms.vNextinator.dll", Some "lib/net20/WebForms.vNextinator.dll", None)
("Net20/WebForms.vNextinator.PDB", Some "lib/net20/WebForms.vNextinator.PDB", None)
("Net35/WebForms.vNextinator.dll", Some "lib/net35/WebForms.vNextinator.dll", None)
("Net35/WebForms.vNextinator.PDB", Some "lib/net35/WebForms.vNextinator.PDB", None)
("Net40/WebForms.vNextinator.dll", Some "lib/net40/WebForms.vNextinator.dll", None)
("Net40/WebForms.vNextinator.PDB", Some "lib/net40/WebForms.vNextinator.PDB", None)
("Net45/WebForms.vNextinator.dll", Some "lib/net45/WebForms.vNextinator.dll", None)
("Net45/WebForms.vNextinator.PDB", Some "lib/net45/WebForms.vNextinator.PDB", None)
("Net46/WebForms.vNextinator.dll", Some "lib/net46/WebForms.vNextinator.dll", None)
("Net46/WebForms.vNextinator.PDB", Some "lib/net46/WebForms.vNextinator.PDB", None)
("web.config.transform", Some "content/web.config.transform", None)]
})
"WebForms.vNextinator.nuspec"
)
Target "Default" (fun _ ->
trace "Hello World from FAKE"
)
// Dependencies
"BuildClean"
==> "CopyWebConfigTransform"
==> "BuildNet20Project"
==> "BuildNet35Project"
==> "BuildNet40Project"
==> "BuildNet45Project"
==> "BuildNet46Project"
==> "CreatePackage"
==> "Default"
// start build
RunTargetOrDefault "Default"