initial fake build script (#16) · 06c05b3c68 - SVN.BY: Go Git Service
Browse Source

initial fake build script (#16)

Tiernan OToole 8 years ago
parent
commit
06c05b3c68
4 changed files with 101 additions and 68 deletions
  1. 14 34
      B2Classes/Properties/AssemblyInfo.cs
  2. 14 34
      B2Uploader/Properties/AssemblyInfo.cs
  3. 71 0
      build.fsx
  4. 2 0
      buildall.cmd

+ 14 - 34
B2Classes/Properties/AssemblyInfo.cs

@@ -1,36 +1,16 @@
1
-using System.Reflection;
2
-using System.Runtime.CompilerServices;
1
+// <auto-generated/>
2
+using System.Reflection;
3 3
 using System.Runtime.InteropServices;
4 4
 
5
-// General Information about an assembly is controlled through the following 
6
-// set of attributes. Change these attribute values to modify the information
7
-// associated with an assembly.
8
-[assembly: AssemblyTitle("B2Classes")]
9
-[assembly: AssemblyDescription("")]
10
-[assembly: AssemblyConfiguration("")]
11
-[assembly: AssemblyCompany("")]
12
-[assembly: AssemblyProduct("B2Classes")]
13
-[assembly: AssemblyCopyright("Copyright Tiernan OToole © 2015")]
14
-[assembly: AssemblyTrademark("")]
15
-[assembly: AssemblyCulture("")]
16
-
17
-// Setting ComVisible to false makes the types in this assembly not visible 
18
-// to COM components.  If you need to access a type in this assembly from 
19
-// COM, set the ComVisible attribute to true on that type.
20
-[assembly: ComVisible(false)]
21
-
22
-// The following GUID is for the ID of the typelib if this project is exposed to COM
23
-[assembly: Guid("fe353639-3b33-44de-9147-45b63818d8a7")]
24
-
25
-// Version information for an assembly consists of the following four values:
26
-//
27
-//      Major Version
28
-//      Minor Version 
29
-//      Build Number
30
-//      Revision
31
-//
32
-// You can specify all the values or you can default the Build and Revision Numbers 
33
-// by using the '*' as shown below:
34
-// [assembly: AssemblyVersion("1.0.*")]
35
-[assembly: AssemblyVersion("1.0.0.0")]
36
-[assembly: AssemblyFileVersion("1.0.0.0")]
5
+[assembly: AssemblyTitleAttribute("B2Classes")]
6
+[assembly: GuidAttribute("fe353639-3b33-44de-9147-45b63818d8a7")]
7
+[assembly: AssemblyProductAttribute("B2 Uploader")]
8
+[assembly: AssemblyCompanyAttribute("Tiernan OToole")]
9
+[assembly: AssemblyCopyrightAttribute("TIernan OToole 2016")]
10
+[assembly: AssemblyVersionAttribute("2016.2.1.866")]
11
+[assembly: AssemblyFileVersionAttribute("2016.2.1.866")]
12
+namespace System {
13
+    internal static class AssemblyVersionInformation {
14
+        internal const string Version = "2016.2.1.866";
15
+    }
16
+}

+ 14 - 34
B2Uploader/Properties/AssemblyInfo.cs

@@ -1,36 +1,16 @@
1
-using System.Reflection;
2
-using System.Runtime.CompilerServices;
1
+// <auto-generated/>
2
+using System.Reflection;
3 3
 using System.Runtime.InteropServices;
4 4
 
5
-// General Information about an assembly is controlled through the following 
6
-// set of attributes. Change these attribute values to modify the information
7
-// associated with an assembly.
8
-[assembly: AssemblyTitle("B2Uploader")]
9
-[assembly: AssemblyDescription("")]
10
-[assembly: AssemblyConfiguration("")]
11
-[assembly: AssemblyCompany("")]
12
-[assembly: AssemblyProduct("B2Uploader")]
13
-[assembly: AssemblyCopyright("Copyright Tiernan OToole ©  2015")]
14
-[assembly: AssemblyTrademark("")]
15
-[assembly: AssemblyCulture("")]
16
-
17
-// Setting ComVisible to false makes the types in this assembly not visible 
18
-// to COM components.  If you need to access a type in this assembly from 
19
-// COM, set the ComVisible attribute to true on that type.
20
-[assembly: ComVisible(false)]
21
-
22
-// The following GUID is for the ID of the typelib if this project is exposed to COM
23
-[assembly: Guid("a5d41169-c2ee-4b5e-a2d8-b63e485597a6")]
24
-
25
-// Version information for an assembly consists of the following four values:
26
-//
27
-//      Major Version
28
-//      Minor Version 
29
-//      Build Number
30
-//      Revision
31
-//
32
-// You can specify all the values or you can default the Build and Revision Numbers 
33
-// by using the '*' as shown below:
34
-// [assembly: AssemblyVersion("1.0.*")]
35
-[assembly: AssemblyVersion("0.1.*")]
36
-//[assembly: AssemblyFileVersion("1.0.0.0")]
5
+[assembly: AssemblyTitleAttribute("B2Uploader")]
6
+[assembly: GuidAttribute("a5d41169-c2ee-4b5e-a2d8-b63e485597a6")]
7
+[assembly: AssemblyProductAttribute("B2 Uploader")]
8
+[assembly: AssemblyCompanyAttribute("Tiernan OToole")]
9
+[assembly: AssemblyCopyrightAttribute("TIernan OToole 2016")]
10
+[assembly: AssemblyVersionAttribute("2016.2.1.866")]
11
+[assembly: AssemblyFileVersionAttribute("2016.2.1.866")]
12
+namespace System {
13
+    internal static class AssemblyVersionInformation {
14
+        internal const string Version = "2016.2.1.866";
15
+    }
16
+}

+ 71 - 0
build.fsx

@@ -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"

+ 2 - 0
buildall.cmd

@@ -0,0 +1,2 @@
1
+call buildx64.cmd
2
+call buildx86.cmd