Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding build script.

  • Loading branch information...
commit e7a03cd8da2eaecf3c2c87005792b85a98f9c2c9 1 parent df33402
@forki authored
Showing with 101 additions and 0 deletions.
  1. +15 −0 TaskTimer.sln
  2. +4 −0 build.bat
  3. +82 −0 build.fsx
View
15 TaskTimer.sln
@@ -7,6 +7,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gma.UserActivityMonitor", "
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TaskTimer", "src\app\TaskTimer\TaskTimer.csproj", "{291B5EBE-8D2B-48AE-9F3F-2D4217ED4238}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C8058A7B-BF46-4B60-8F12-6C44A0A7857B}"
+ ProjectSection(SolutionItems) = preProject
+ build.bat = build.bat
+ build.fsx = build.fsx
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{F03BAD89-AE30-424F-8AC9-2F1A3DA5974E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TaskTimer.Specs", "src\test\TaskTimer.Specs\TaskTimer.Specs.csproj", "{7CE6E387-6AAB-496A-B11B-6F8C82F9DEBE}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -21,6 +31,10 @@ Global
{291B5EBE-8D2B-48AE-9F3F-2D4217ED4238}.Debug|Any CPU.Build.0 = Debug|Any CPU
{291B5EBE-8D2B-48AE-9F3F-2D4217ED4238}.Release|Any CPU.ActiveCfg = Release|Any CPU
{291B5EBE-8D2B-48AE-9F3F-2D4217ED4238}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7CE6E387-6AAB-496A-B11B-6F8C82F9DEBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7CE6E387-6AAB-496A-B11B-6F8C82F9DEBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7CE6E387-6AAB-496A-B11B-6F8C82F9DEBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7CE6E387-6AAB-496A-B11B-6F8C82F9DEBE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -28,5 +42,6 @@ Global
GlobalSection(NestedProjects) = preSolution
{F52AA97E-180A-40ED-8F2B-09080171D6C7} = {29342FEB-9E7B-4817-9671-98662A339FE9}
{291B5EBE-8D2B-48AE-9F3F-2D4217ED4238} = {29342FEB-9E7B-4817-9671-98662A339FE9}
+ {7CE6E387-6AAB-496A-B11B-6F8C82F9DEBE} = {F03BAD89-AE30-424F-8AC9-2F1A3DA5974E}
EndGlobalSection
EndGlobal
View
4 build.bat
@@ -0,0 +1,4 @@
+@echo off
+cls
+"tools\FAKE\Fake.exe" build.fsx
+pause
View
82 build.fsx
@@ -0,0 +1,82 @@
+// include Fake libs
+#I "tools\FAKE"
+#r "FakeLib.dll"
+
+open Fake
+
+// Directories
+let buildDir = @".\build\"
+let testDir = @".\test\"
+let deployDir = @".\deploy\"
+
+// tools
+let nunitPath = @".\Tools\NUnit"
+
+// Filesets
+let appReferences =
+ !+ @"src\app\**\*.csproj"
+ ++ @"src\app\**\*.fsproj"
+ |> Scan
+
+let testReferences =
+ !+ @"src\test\**\*.csproj"
+ |> Scan
+
+// version info
+let productName = "TaskTimer"
+
+// Targets
+Target? Clean <-
+ fun _ -> CleanDirs [buildDir; testDir; deployDir]
+
+Target? BuildApp <-
+ fun _ ->
+ if buildServer <> LocalBuild then
+ AssemblyInfo
+ (fun p ->
+ {p with
+ CodeLanguage = CSharp;
+ AssemblyVersion = buildVersion;
+ AssemblyTitle = "Task Timer";
+ AssemblyDescription = "C# Time tracker for Windows";
+ Guid = "8264251e-ecb4-4221-b995-5f4cab30c24d";
+ OutputFileName = @".\src\app\TaskTimer\Properties\AssemblyInfo.cs"})
+
+
+ // compile all projects below src\app\
+ MSBuildRelease buildDir "Build" appReferences
+ |> Log "AppBuild-Output: "
+
+Target? BuildTest <-
+ fun _ ->
+ MSBuildDebug testDir "Build" testReferences
+ |> Log "TestBuild-Output: "
+
+Target? Test <-
+ fun _ ->
+ !+ (testDir + @"\*.Specs.dll")
+ |> Scan
+ |> NUnit (fun p ->
+ {p with
+ ToolPath = nunitPath;
+ DisableShadowCopy = true;
+ OutputFile = testDir + @"TestResults.xml"})
+
+Target? Deploy <-
+ fun _ ->
+ !+ (buildDir + "\**\*.*")
+ -- "*.zip"
+ |> Scan
+ |> Zip buildDir (deployDir + productName + "." + buildVersion + ".zip")
+
+Target? Default <- DoNothing
+
+// Dependencies
+For? BuildApp <- Dependency? Clean
+For? BuildTest <- Dependency? Clean
+For? Test <- Dependency? BuildApp |> And? BuildTest
+For? Deploy <- Dependency? Test
+For? Default <- Dependency? Deploy
+
+// start build
+Run? Default
Please sign in to comment.
Something went wrong with that request. Please try again.