Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 34 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
*.csproj.user

#ignore thumbnails created by windows
Thumbs.db
#Ignore files build by Visual Studio
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
bin
obj
packages
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
[Bb]in
[Dd]ebug*/
*.lib
*.sbr
obj/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*
build/
deploy/
docs/
tools/FAKE/templates/
test/
*_Spliced.*
4 changes: 0 additions & 4 deletions HttpMachine.Tests/packages.config

This file was deleted.

12 changes: 10 additions & 2 deletions HttpMachine.sln
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HttpMachine", "HttpMachine\HttpMachine.csproj", "{76FB25C5-15B1-4541-8D19-D78790257C95}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HttpMachine", "src\HttpMachine\HttpMachine.csproj", "{76FB25C5-15B1-4541-8D19-D78790257C95}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HttpMachine.Tests", "HttpMachine.Tests\HttpMachine.Tests.csproj", "{75BEA10B-761A-474F-9522-57E8974B52D6}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HttpMachine.Tests", "src\HttpMachine.Tests\HttpMachine.Tests.csproj", "{75BEA10B-761A-474F-9522-57E8974B52D6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{53A0F2F3-7516-49F0-A6E6-FFB9FF0D9FD1}"
ProjectSection(SolutionItems) = preProject
build.bat = build.bat
build.fsx = build.fsx
LICENSE.txt = LICENSE.txt
README.md = README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@echo off
cls
"lib\FAKE\Fake.exe" "build.fsx"
pause
130 changes: 130 additions & 0 deletions build.fsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
#I "lib/FAKE"
#r "FakeLib.dll"
open Fake
open Fake.MSBuild

(* properties *)
let projectName = "HttpMachine"
let version = "1.0.0-pre"
let projectSummary = "HttpMachine is a .NET HTTP request parser."
let projectDescription = "HttpMachine is a .NET HTTP request parser."
let authors = ["Benjamin van der Veen"]
let mail = "b@bvanderveen.com"
let homepage = "https://github.com/bvanderveen/httpmachine"

(* Directories *)
let buildDir = "./build/"
let docsDir = "./docs/"
let deployDir = "./deploy/"
let testDir = "./test/"
let nugetDir = "./nuget/"

(* Tools *)
let nunitPath = "./packages/NUnit.2.5.9.10348/Tools"
let nunitOutput = testDir + "TestResults.xml"
let zipFileName = deployDir + sprintf "%s-%s.zip" projectName version

(* files *)
let appReferences =
!+ @"src\**\*.csproj"
++ @"src\**\*.fsproj"
-- "**\*_Spliced*"
|> Scan

let filesToZip =
!+ (buildDir + "/**/*.*")
-- "*.zip"
|> Scan

(* Targets *)
Target? Clean <-
fun _ -> CleanDirs [buildDir; testDir; deployDir; docsDir; nugetDir]

Target? BuildApp <-
fun _ ->
if not isLocalBuild then
AssemblyInfo
(fun p ->
{p with
CodeLanguage = FSharp;
AssemblyVersion = buildVersion;
AssemblyTitle = projectName;
AssemblyDescription = projectDescription;
Guid = "1e95a279-c2a9-498b-bc72-6e7a0d6854ce";
OutputFileName = "./src/AssemblyInfo.fs"})

appReferences
|> MSBuildRelease buildDir "Build"
|> Log "AppBuild-Output: "

Target? BuildTest <-
fun _ ->
appReferences
|> MSBuildDebug testDir "Build"
|> Log "TestBuild-Output: "

Target? Test <-
fun _ ->
!+ (testDir + "/*.dll")
|> Scan
|> NUnit (fun p ->
{p with
ToolPath = nunitPath;
DisableShadowCopy = true;
OutputFile = nunitOutput})

Target? GenerateDocumentation <-
fun _ ->
!+ (buildDir + "Cashel.dll")
|> Scan
|> Docu (fun p ->
{p with
ToolPath = "./lib/FAKE/docu.exe"
TemplatesPath = "./lib/FAKE/templates"
OutputPath = docsDir })

Target? CopyLicense <-
fun _ ->
[ "LICENSE.txt" ] |> CopyTo buildDir

Target? BuildZip <-
fun _ -> Zip buildDir zipFileName filesToZip

Target? ZipDocumentation <-
fun _ ->
let docFiles =
!+ (docsDir + "/**/*.*")
|> Scan
let zipFileName = deployDir + sprintf "Documentation-%s.zip" version
Zip docsDir zipFileName docFiles

Target? CreateNuGet <-
fun _ ->
let nugetDocsDir = nugetDir @@ "docs/"
let nugetToolsDir = nugetDir @@ "lib/"

XCopy docsDir nugetDocsDir
XCopy buildDir nugetToolsDir

NuGet (fun p ->
{p with
Authors = authors
Project = projectName
Description = projectDescription
OutputPath = nugetDir }) "Cashel.nuspec"

Target? Default <- DoNothing
Target? Deploy <- DoNothing

// Dependencies
For? BuildApp <- Dependency? Clean
For? Test <- Dependency? BuildApp |> And? BuildTest
For? GenerateDocumentation <- Dependency? BuildApp
For? ZipDocumentation <- Dependency? GenerateDocumentation
For? BuildZip <- Dependency? BuildApp |> And? CopyLicense
For? CreateNuGet <- Dependency? Test |> And? BuildZip |> And? ZipDocumentation
For? Deploy <- Dependency? Test |> And? BuildZip |> And? ZipDocumentation
For? Default <- Dependency? Deploy

// start build
Run? Default
10 changes: 10 additions & 0 deletions lib/FAKE/DocuLicense.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Copyright (c) 2009, James Gregory
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* The name of James Gregory may not be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Binary file added lib/FAKE/FAKE.exe
Binary file not shown.
8 changes: 8 additions & 0 deletions lib/FAKE/FAKE.exe.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="MSBuildPath" value="c:\Windows\Microsoft.NET\Framework\v4.0.30319\;c:\Windows\Microsoft.NET\Framework\v4.0.30128\;c:\Windows\Microsoft.NET\Framework\v3.5\" />
<add key="FSIPath" value=".\tools\FSharp\;.\lib\FSharp\;[ProgramFiles]\Microsoft F#\v4.0\;[ProgramFilesX86]\Microsoft F#\v4.0\;[ProgramFiles]\FSharp-2.0.0.0\bin\;[ProgramFilesX86]\FSharp-2.0.0.0\bin\;[ProgramFiles]\FSharp-1.9.9.9\bin\;[ProgramFilesX86]\FSharp-1.9.9.9\bin\" />
<add key="GitPath" value="[ProgramFilesX86]\Git\bin\;[ProgramFiles]\Git\bin\" />
</appSettings>
</configuration>
Binary file added lib/FAKE/FSharp.Core.dll
Binary file not shown.
Binary file added lib/FAKE/FSharp.Core.optdata
Binary file not shown.
Binary file added lib/FAKE/FSharp.Core.sigdata
Binary file not shown.
Loading