Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
437 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -242,4 +242,7 @@ ModelManifest.xml | |
.paket/paket.exe | ||
|
||
# FAKE - F# Make | ||
.fake/ | ||
.fake/ | ||
.build/ | ||
.test/ | ||
tools/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
version: 1.0.{build} | ||
image: Visual Studio 2017 | ||
before_build: | ||
nuget restore | ||
build: | ||
project: src\DiscriminatedUnion.csproj | ||
publish_nuget: true | ||
publish_nuget_symbols: true | ||
include_nuget_references: true | ||
verbosity: minimal | ||
environment: | ||
version: 1.0.{build} | ||
assembly_info: | ||
patch: false | ||
build_script: | ||
build.cmd | ||
test: off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@echo off | ||
cls | ||
NuGet.exe "Install" "FAKE" "-OutputDirectory" "packages" "-ExcludeVersion" | ||
NuGet.exe "Install" "xunit.runner.console" "-OutputDirectory" "tools" "-ExcludeVersion" | ||
|
||
"packages\FAKE\tools\Fake.exe" build.fsx %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
// include Fake lib | ||
#r @"packages/FAKE/tools/FakeLib.dll" | ||
open Fake | ||
open Fake.Testing | ||
open Fake.Testing.XUnit2 | ||
open Fake.AppVeyor | ||
open Fake.NuGetHelper | ||
open System.IO | ||
|
||
[<AutoOpen>] | ||
module Settings = | ||
let buildDir = "./.build/" | ||
let packagingDir = buildDir + "BuildOutput/" | ||
let deployDir = "./.deploy/" | ||
let testDir = "./.test/" | ||
let projects = !! "src/**/*.csproj" -- "src/**/*.Tests.csproj" | ||
let testProjects = !! "src/**/*Tests.csproj" | ||
let packages = !! "./**/packages.config" | ||
|
||
let getOutputDir proj = | ||
let folderName = Directory.GetParent(proj).Name | ||
sprintf "%s%s/" buildDir folderName | ||
|
||
let build proj = | ||
let outputDir = proj |> getOutputDir | ||
MSBuildRelease outputDir "ResolveReferences;Build" [proj] |> ignore | ||
|
||
let getVersion() = | ||
let buildCandidate = (environVar "APPVEYOR_BUILD_NUMBER") | ||
if buildCandidate = "" || buildCandidate = null then "1.0.0" else (sprintf "1.0.0.%s" buildCandidate) | ||
|
||
[<AutoOpen>] | ||
module Targets = | ||
Target "Clean" (fun() -> | ||
CleanDirs [buildDir; deployDir; testDir] | ||
) | ||
|
||
Target "RestorePackages" (fun _ -> | ||
packages | ||
|> Seq.iter (RestorePackage (fun p -> {p with OutputPath = "./packages"})) | ||
) | ||
|
||
Target "Build" (fun() -> | ||
projects | ||
|> Seq.iter build | ||
) | ||
|
||
Target "BuildTest" (fun() -> | ||
testProjects | ||
|> MSBuildDebug testDir "Build" | ||
|> ignore | ||
) | ||
|
||
Target "CopyMain" (fun _ -> | ||
let targetDir = packagingDir @@ "main" | ||
let sourceFile = buildDir + "DiscriminatedUnion/DiscriminatedUnion.dll" | ||
CreateDir targetDir | ||
CopyFile targetDir sourceFile | ||
) | ||
|
||
Target "CopyJson" (fun _ -> | ||
let targetDir = packagingDir @@ "json" | ||
let sourceFile = buildDir + "DiscriminatedUnionJsonConverter/DiscriminatedUnionJsonConverter.dll" | ||
CreateDir targetDir | ||
CopyFile targetDir sourceFile | ||
) | ||
|
||
Target "CopyAuto" (fun _ -> | ||
let targetDir = packagingDir @@ "automap" | ||
let sourceFile = buildDir + "DiscriminatedUnionAutoMap/DiscriminatedUnionAutoMap.dll" | ||
CreateDir targetDir | ||
CopyFile targetDir sourceFile | ||
) | ||
|
||
Target "Test" (fun() -> | ||
!!(testDir @@ "*Tests.dll") | ||
|> xUnit2 (fun p -> | ||
{p with | ||
ShadowCopy = false; | ||
HtmlOutputPath = Some (testDir @@ "xunit.html"); | ||
XmlOutputPath = Some (testDir @@ "xunit.xml"); | ||
}) | ||
) | ||
|
||
Target "PackageMain" (fun _ -> | ||
trace "Packing" | ||
let version = getVersion() | ||
NuGet (fun p -> | ||
{p with | ||
Project = "DiscriminatedUnion" | ||
Authors = ["David Lewis"] | ||
Description = "Discriminated Union" | ||
OutputPath = deployDir | ||
Summary = "Discriminated Union with Fluent Matching written for C#" | ||
WorkingDir = packagingDir @@ "main" | ||
Files = [(buildDir + "DiscriminatedUnion/DiscriminatedUnion.dll", None, None)] | ||
Version = version | ||
Publish = false | ||
}) | ||
("src/DiscriminatedUnion/DiscriminatedUnion.nuspec") | ||
) | ||
|
||
Target "PackageJson" (fun _ -> | ||
trace "Packing" | ||
let version = getVersion() | ||
NuGet (fun p -> | ||
{p with | ||
Project = "DiscriminatedUnionJsonConverter" | ||
Authors = ["David Lewis"] | ||
Description = "Discriminated Union Json Helper" | ||
OutputPath = deployDir | ||
Dependencies = | ||
[ | ||
("DiscriminatedUnion", version) | ||
("Newtonsoft.Json", "10.0.3")] | ||
Summary = "Discriminated Union with Fluent Matching written for C#" | ||
WorkingDir = packagingDir @@ "json" | ||
Files = [(buildDir @@ "DiscriminatedUnionJsonConverter/DiscriminatedUnionJsonConverter.dll", None, None)] | ||
Version = version | ||
Publish = false }) | ||
("src/DiscriminatedUnionJsonConverter/DiscriminatedUnionJsonConverter.nuspec") | ||
) | ||
|
||
Target "PackageAutoMap" (fun _ -> | ||
trace "Packing" | ||
let version = getVersion() | ||
NuGet (fun p -> | ||
{p with | ||
Project = "DiscriminatedUnionAutoMap" | ||
Authors = ["David Lewis"] | ||
Description = "Discriminated Union AutoMap Helper" | ||
OutputPath = deployDir | ||
Dependencies = | ||
[ | ||
("DiscriminatedUnion", version) | ||
("AutoMapper", "6.1.0")] | ||
Summary = "Discriminated Union with Fluent Matching written for C#" | ||
WorkingDir = packagingDir @@ "automap" | ||
Files = [(buildDir @@ "DiscriminatedUnionAutoMap/DiscriminatedUnionAutoMap.dll", None, None)] | ||
Version = version | ||
Publish = false }) | ||
("src/DiscriminatedUnionAutoMap/DiscriminatedUnionAutoMap.nuspec") | ||
) | ||
|
||
Target "Default" (fun _ -> ()) | ||
|
||
"Clean" | ||
==> "RestorePackages" | ||
==> "Build" | ||
==> "BuildTest" | ||
==> "Test" | ||
==> "CopyMain" | ||
==> "CopyJson" | ||
==> "CopyAuto" | ||
==> "PackageMain" | ||
==> "PackageJson" | ||
==> "PackageAutoMap" | ||
==> "Default" | ||
|
||
RunTargetOrDefault "Default" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0"?> | ||
<package > | ||
<metadata> | ||
<id>DiscriminatedUnion</id> | ||
<version>1.0.0</version> | ||
<authors>David Lewis</authors> | ||
<owners>David Lewis</owners> | ||
<licenseUrl>https://github.com/sdedalus/DiscriminatedUnion</licenseUrl> | ||
<projectUrl>https://github.com/sdedalus/DiscriminatedUnion</projectUrl> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<description>Discriminated Union implementation for C#</description> | ||
<releaseNotes>First</releaseNotes> | ||
<copyright>Copyright 2017</copyright> | ||
<tags>Discriminated Union</tags> | ||
<dependencies> | ||
</dependencies> | ||
</metadata> | ||
<files> | ||
<file src="DiscriminatedUnion.dll" target="lib\net45" /> | ||
</files> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/DiscriminatedUnionAutoMap/DiscriminatedUnionAutoMap.nuspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0"?> | ||
<package > | ||
<metadata> | ||
<id>DiscriminatedUnionAutoMap</id> | ||
<version>$version$</version> | ||
<title>$title$</title> | ||
<authors>["David Lewis"]</authors> | ||
<owners>$author$</owners> | ||
<licenseUrl>https://github.com/sdedalus/DiscriminatedUnion</licenseUrl> | ||
<projectUrl>https://github.com/sdedalus/DiscriminatedUnion</projectUrl> | ||
<iconUrl>https://github.com/sdedalus/DiscriminatedUnion</iconUrl> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<description>DiscriminatedUnion AutoMap Helper.</description> | ||
<releaseNotes>Summary of changes made in this release of the package.</releaseNotes> | ||
<copyright>Copyright 2017</copyright> | ||
<tags>Tag1 Tag2</tags> | ||
</metadata> | ||
<files> | ||
<file src="DiscriminatedUnionAutoMap.dll" target="lib\net45" /> | ||
</files> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.