Skip to content

Commit

Permalink
Making initial migration to FAKE/Paket.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Davis authored and Ian Davis committed Jul 24, 2016
1 parent e6b2fb6 commit 4d63bb8
Show file tree
Hide file tree
Showing 12 changed files with 108 additions and 14 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ release
*.cache
MSBuildOutput.txt
Packages/
TestResults/
.fake/
TestResult*
.paket/paket.exe
Binary file added .paket/paket.bootstrapper.exe
Binary file not shown.
14 changes: 14 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@echo off
cls

.paket\paket.bootstrapper.exe
if errorlevel 1 (
exit /b %errorlevel%
)

.paket\paket.exe restore
if errorlevel 1 (
exit /b %errorlevel%
)

packages\FAKE\tools\FAKE.exe build.fsx %*
48 changes: 48 additions & 0 deletions build.fsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#r @"packages/FAKE/tools/FakeLib.dll"
open Fake
open Fake.FileHelper
open Fake.Testing.NUnit3

RestorePackages()

let buildDir = "build"
let nunit3 = "./packages/NUnit.ConsoleRunner/tools/nunit3-console.exe"

CreateDir buildDir

Target "Clean" (fun _ ->
CleanDir "build"
)

Target "Compile" (fun _ ->
let buildMode = getBuildParamOrDefault "buildMode" "Release"
let setParams defaults =
{ defaults with
Verbosity = Some(Quiet)
Targets = ["Build"]
Properties =
[
"Optimize", "True"
"DebugSymbols", "True"
"Configuration", buildMode
]
}
build setParams "./Archetype.sln"
|> DoNothing
)

Target "Test" (fun _ ->
!! ("src/**/bin/Release/*.Tests.dll")
|> NUnit3 (fun p ->
{p with
ShadowCopy = false
WorkingDir = "./build"
ToolPath = nunit3 })
)

"Clean"
==> "Compile"
==> "Test"


RunTargetOrDefault "Test"
5 changes: 5 additions & 0 deletions paket.dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source https://nuget.org/api/v2

nuget FAKE
nuget NUnit 3.4.1
nuget NUnit.Runners 3.4.1
17 changes: 17 additions & 0 deletions paket.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
NUGET
remote: https://www.nuget.org/api/v2
FAKE (4.35)
NUnit (3.4.1)
NUnit.ConsoleRunner (3.4.1)
NUnit.Extension.NUnitProjectLoader (3.4.1)
NUnit.Extension.NUnitV2Driver (3.4.1)
NUnit.Extension.NUnitV2ResultWriter (3.4.1)
NUnit.Extension.TeamCityEventListener (1.0.1)
NUnit.Extension.VSProjectLoader (3.4.1)
NUnit.Runners (3.4.1)
NUnit.ConsoleRunner (>= 3.4.1)
NUnit.Extension.NUnitProjectLoader (>= 3.4.1)
NUnit.Extension.NUnitV2Driver (>= 3.4.1)
NUnit.Extension.NUnitV2ResultWriter (>= 3.4.1)
NUnit.Extension.TeamCityEventListener (>= 1.0.1)
NUnit.Extension.VSProjectLoader (>= 3.4.1)
9 changes: 5 additions & 4 deletions src/Archetype.Examples/Archetype.Examples.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand All @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Archetype.Examples</RootNamespace>
<AssemblyName>Archetype.Examples</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand All @@ -33,8 +33,9 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework">
<HintPath>..\Archetype.Tests\bin\Debug\nunit.framework.dll</HintPath>
<Reference Include="nunit.framework, Version=2.6.1.12217, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\NUnit\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
2 changes: 1 addition & 1 deletion src/Archetype.Examples/NotifyPropertyChangesExamples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ internal INotifyPropertyChanges Inpc
}
}

[Ignore]
[Ignore("I don't remember")]
[TestFixture]
public class PersonExamples
{
Expand Down
12 changes: 8 additions & 4 deletions src/Archetype.Tests/Archetype.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand All @@ -9,8 +9,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Archetype.Tests</RootNamespace>
<AssemblyName>Archetype.Tests</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -21,6 +22,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -29,10 +31,12 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework">
<HintPath>..\..\lib\NUnit\lib\nunit.framework.dll</HintPath>
<Reference Include="nunit.framework, Version=2.6.1.12217, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\NUnit\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
2 changes: 1 addition & 1 deletion src/Archetype.Tests/CastingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void Dispose()


[TestFixture]
[Ignore]
[Ignore("I don't remember")]
public class CastingTests
{
[Test]
Expand Down
2 changes: 1 addition & 1 deletion src/Archetype.Tests/NotifyPropertyChangesModuleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public string Name
}

[TestFixture]
[Ignore]
[Ignore("I don't remember")]
public class NotifyPropertyChangesModuleTests
{
private bool _Called;
Expand Down
7 changes: 5 additions & 2 deletions src/Archetype/Archetype.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand All @@ -9,8 +9,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Archetype</RootNamespace>
<AssemblyName>Archetype</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -20,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -28,6 +30,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down

0 comments on commit 4d63bb8

Please sign in to comment.