From 7fcd6da284ccb73df9f8d77ec3ba7fb81f9cb2d8 Mon Sep 17 00:00:00 2001 From: Jared Hester Date: Thu, 1 Dec 2016 10:24:35 -0500 Subject: [PATCH] add facade rename to build --- .../Expecto.BenchmarkDotNet.fs | 5 ++--- .../Expecto.BenchmarkDotNet.fsproj | 1 + Expecto.Sample/Expecto.Sample.fsproj | 1 + Expecto.netcore/Expecto.netcore.fsproj | 6 +++--- Expecto.sln | 4 ++++ Expecto/Expecto.fs | 9 +++------ build.fsx | 18 +++++++++++++++++- 7 files changed, 31 insertions(+), 13 deletions(-) diff --git a/Expecto.BenchmarkDotNet/Expecto.BenchmarkDotNet.fs b/Expecto.BenchmarkDotNet/Expecto.BenchmarkDotNet.fs index be3721b5..49f4d0c2 100644 --- a/Expecto.BenchmarkDotNet/Expecto.BenchmarkDotNet.fs +++ b/Expecto.BenchmarkDotNet/Expecto.BenchmarkDotNet.fs @@ -12,9 +12,8 @@ open BenchmarkDotNet.Loggers open BenchmarkDotNet.Order open BenchmarkDotNet.Validators open Expecto -//open Expecto.Logging -//open Expecto.Logging.Message -open Logary.Facade +open Expecto.Logging +open Expecto.Logging.Message [] module BenchmarkDotNet = diff --git a/Expecto.BenchmarkDotNet/Expecto.BenchmarkDotNet.fsproj b/Expecto.BenchmarkDotNet/Expecto.BenchmarkDotNet.fsproj index 7bf875a4..c815ac56 100644 --- a/Expecto.BenchmarkDotNet/Expecto.BenchmarkDotNet.fsproj +++ b/Expecto.BenchmarkDotNet/Expecto.BenchmarkDotNet.fsproj @@ -45,6 +45,7 @@ + diff --git a/Expecto.Sample/Expecto.Sample.fsproj b/Expecto.Sample/Expecto.Sample.fsproj index bcf546e9..533ab2bd 100644 --- a/Expecto.Sample/Expecto.Sample.fsproj +++ b/Expecto.Sample/Expecto.Sample.fsproj @@ -55,6 +55,7 @@ + diff --git a/Expecto.netcore/Expecto.netcore.fsproj b/Expecto.netcore/Expecto.netcore.fsproj index d04a74af..34157f69 100644 --- a/Expecto.netcore/Expecto.netcore.fsproj +++ b/Expecto.netcore/Expecto.netcore.fsproj @@ -1,8 +1,8 @@ - Expecto.netcore - 1.0.0-preview3 + Expecto + 1.1.2 Library netstandard1.6 pdbonly @@ -14,7 +14,7 @@ - + diff --git a/Expecto.sln b/Expecto.sln index 6706030b..1f1209df 100644 --- a/Expecto.sln +++ b/Expecto.sln @@ -19,9 +19,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{1870 .editorconfig = .editorconfig .gitignore = .gitignore .travis.yml = .travis.yml + appveyor.yml = appveyor.yml build.cmd = build.cmd + build.fsx = build.fsx build.sh = build.sh + docker-build.sh = docker-build.sh Gemfile = Gemfile + globals.json = globals.json paket.dependencies = paket.dependencies Rakefile = Rakefile README.md = README.md diff --git a/Expecto/Expecto.fs b/Expecto/Expecto.fs index 8cb33616..4bae4e93 100644 --- a/Expecto/Expecto.fs +++ b/Expecto/Expecto.fs @@ -128,11 +128,9 @@ module Test = module Impl = -// open Expecto.Logging -// open Expecto.Logging.Message + open Expecto.Logging + open Expecto.Logging.Message open Helpers - open Logary.Facade - open Logary.Facade.Message let logger = Log.create "Expecto" @@ -430,11 +428,10 @@ module Impl = [] module Tests = -// open Expecto.Logging open Impl open Helpers open Argu - open Logary.Facade + open Expecto.Logging /// Fail this test let inline failtest msg = raise <| AssertException msg diff --git a/build.fsx b/build.fsx index ba82b616..49b50094 100644 --- a/build.fsx +++ b/build.fsx @@ -15,6 +15,21 @@ let run cmd args dir = ) System.TimeSpan.MaxValue = false then failwithf "Error while running '%s' with args: %s" cmd args +// -------------------------------------------------------------------------------------- +// Rename Logary Facades for Expecto +// (why this is necessary - https://github.com/logary/logary/#using-logary-in-a-library) + +Target "ExpectoChangeo" (fun _ -> + ReplaceInFiles [ + "namespace Logary.Facade", "namespace Expecto.Logging" + "namespace Logary.Facade.Messages", "namespace Expecto.Logging.Messages" + "open Logary.Facade", "open Expecto.Logging" + "open Logary.Facade.Messages", "open Expecto.Logging.Messages" + ][ + "paket-files/logary/logary/src/Logary.Facade/Facade.fs" + ] +) + // -------------------------------------------------------------------------------------- // Clean Build Detritus @@ -57,7 +72,8 @@ Target "DotnetBuild" (fun _ -> Target "All" DoNothing -"Clean" +"ExpectoChangeo" + ==> "Clean" ==> "Build" <=> "DotnetBuild"