|
@@ -0,0 +1,71 @@
|
|
1
|
+//include fake lib
|
|
2
|
+#r @"tools\FAKE\tools\Fakelib.dll"
|
|
3
|
+open Fake
|
|
4
|
+open System
|
|
5
|
+open Fake.AssemblyInfoFile
|
|
6
|
+
|
|
7
|
+let buildDir = @".\build"
|
|
8
|
+let deployDir = @".\deploy"
|
|
9
|
+
|
|
10
|
+let date = DateTime.UtcNow
|
|
11
|
+let version = String.Format("{0}.{1}.{2}.{3:0.#}", date.Year, date.Month, date.Day, date.TimeOfDay.TotalMinutes.ToString("F0"))
|
|
12
|
+
|
|
13
|
+let copyright = "TIernan OToole 2016"
|
|
14
|
+let productName = "B2 Uploader"
|
|
15
|
+let companyName = "Tiernan OToole"
|
|
16
|
+
|
|
17
|
+Target "SetAssemblyInfo" (fun _ ->
|
|
18
|
+
|
|
19
|
+ CreateCSharpAssemblyInfo "B2Classes/Properties/AssemblyInfo.cs"
|
|
20
|
+ [Attribute.Title "B2Classes"
|
|
21
|
+ Attribute.Guid "fe353639-3b33-44de-9147-45b63818d8a7"
|
|
22
|
+ Attribute.Product productName
|
|
23
|
+ Attribute.Company companyName
|
|
24
|
+ Attribute.Copyright copyright
|
|
25
|
+ Attribute.Version version
|
|
26
|
+ Attribute.FileVersion version
|
|
27
|
+ ]
|
|
28
|
+
|
|
29
|
+ CreateCSharpAssemblyInfo "B2Uploader/Properties/AssemblyInfo.cs"
|
|
30
|
+ [Attribute.Title "B2Uploader"
|
|
31
|
+ Attribute.Guid "a5d41169-c2ee-4b5e-a2d8-b63e485597a6"
|
|
32
|
+ Attribute.Product productName
|
|
33
|
+ Attribute.Company companyName
|
|
34
|
+ Attribute.Copyright copyright
|
|
35
|
+ Attribute.Version version
|
|
36
|
+ Attribute.FileVersion version
|
|
37
|
+ ]
|
|
38
|
+)
|
|
39
|
+
|
|
40
|
+RestorePackages()
|
|
41
|
+
|
|
42
|
+Target "Clean" (fun _ ->
|
|
43
|
+ CleanDir buildDir
|
|
44
|
+)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+Target "Classes" (fun _ ->
|
|
48
|
+ !! @"B2Classes\B2Classes.csproj"
|
|
49
|
+ |> MSBuildRelease buildDir "Build"
|
|
50
|
+ |> Log "AppBuild-Output: "
|
|
51
|
+)
|
|
52
|
+
|
|
53
|
+Target "Uploader" (fun _ ->
|
|
54
|
+ !! @"B2Uploader\B2Uploader.csproj"
|
|
55
|
+ |> MSBuildRelease buildDir "Build"
|
|
56
|
+ |> Log "AppBuild-Output: "
|
|
57
|
+)
|
|
58
|
+
|
|
59
|
+Target "Zip" (fun _ ->
|
|
60
|
+ !! (buildDir + "\**\*.*")
|
|
61
|
+ -- "*.zip"
|
|
62
|
+ |> Zip buildDir (deployDir + "\B2Uploader." + version + ".zip")
|
|
63
|
+)
|
|
64
|
+
|
|
65
|
+"Clean"
|
|
66
|
+ ==> "SetAssemblyInfo"
|
|
67
|
+ ==> "Classes"
|
|
68
|
+ ==> "Uploader"
|
|
69
|
+ ==> "Zip"
|
|
70
|
+
|
|
71
|
+RunTargetOrDefault "Zip"
|