From 34b67a17314cdaa2723c30a0680f6ddfeb27dfad Mon Sep 17 00:00:00 2001 From: Chris Missal Date: Tue, 27 Oct 2015 16:56:26 -0500 Subject: [PATCH 1/4] correction to Branches.fs comments --- src/app/FakeLib/Git/Branches.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/FakeLib/Git/Branches.fs b/src/app/FakeLib/Git/Branches.fs index 9638a727dfa..79a82c45dc0 100644 --- a/src/app/FakeLib/Git/Branches.fs +++ b/src/app/FakeLib/Git/Branches.fs @@ -149,7 +149,7 @@ let pushTag repositoryDir remote tag = directRunGitCommand repositoryDir (sprint /// /// - `repositoryDir` - The git repository. /// - `remote` - The remote. -/// - `branch` - The tag. +/// - `branch` - The branch. let pushBranch repositoryDir remote branch = directRunGitCommand repositoryDir (sprintf "push %s %s" remote branch) |> ignore /// Pulls a given branch from the given remote. From 6f7205ce529d1fe72737d382b9730430dbd375da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Einar?= Date: Thu, 29 Oct 2015 10:07:29 +0100 Subject: [PATCH 2/4] Allow for ignoring failing tests in DotCover DotCover defaults are kept to keep current behavior. --- src/app/FakeLib/DotCover.fs | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/app/FakeLib/DotCover.fs b/src/app/FakeLib/DotCover.fs index 1fa7885991d..308e11e4637 100644 --- a/src/app/FakeLib/DotCover.fs +++ b/src/app/FakeLib/DotCover.fs @@ -23,6 +23,7 @@ type DotCoverParams = TargetWorkingDir: string Output: string Filters: string + ErrorLevel: TestRunnerErrorLevel CustomParameters: string } /// The dotCover default parameters @@ -34,7 +35,8 @@ let DotCoverDefaults = TargetWorkingDir = "" Filters = "" Output = "dotCoverSnapshot.dcvr" - CustomParameters = "" } + CustomParameters = "" + ErrorLevel = ErrorLevel.Error} type DotCoverMergeParams = { ToolPath: string @@ -102,14 +104,22 @@ let getWorkingDir workingDir = Seq.find isNotNullOrEmpty [workingDir; environVar("teamcity.build.workingDir"); "."] |> Path.GetFullPath -let buildParamsAndExecute parameters buildArguments toolPath workingDir = +let buildParamsAndExecute parameters buildArguments toolPath workingDir failBuild = let args = buildArguments parameters trace (toolPath + " " + args) let result = ExecProcess (fun info -> info.FileName <- toolPath info.WorkingDirectory <- getWorkingDir workingDir info.Arguments <- args) TimeSpan.MaxValue - if result <> 0 then failwithf "Error running %s" toolPath + let ExitCodeForFailedTests = -3 + if (result = ExitCodeForFailedTests && not failBuild) then + trace (sprintf "DotCover %s exited with errorcode %d" toolPath result) + else if (result = ExitCodeForFailedTests && failBuild) then + failwithf "Failing tests, use ErrorLevel.DontFailBuild to ignore failing tests. Exited %s with errorcode %d" toolPath result + else if (result <> 0) then + failwithf "Error running %s with exitcode %d" toolPath result + else + trace (sprintf "DotCover exited successfully") /// Runs the dotCover "cover" command, using a target executable (such as NUnit or MSpec) and generates a snapshot file. /// @@ -118,7 +128,7 @@ let buildParamsAndExecute parameters buildArguments toolPath workingDir = /// - `setParams` - Function used to overwrite the dotCover default parameters. let DotCover (setParams: DotCoverParams -> DotCoverParams) = let parameters = (DotCoverDefaults |> setParams) - buildParamsAndExecute parameters buildDotCoverArgs parameters.ToolPath parameters.WorkingDir + buildParamsAndExecute parameters buildDotCoverArgs parameters.ToolPath parameters.WorkingDir (parameters.ErrorLevel <> ErrorLevel.DontFailBuild) /// Runs the dotCover "merge" command. This combines dotCover snaphots into a single /// snapshot, enabling you to merge test coverage from multiple test running frameworks @@ -134,7 +144,7 @@ let DotCover (setParams: DotCoverParams -> DotCoverParams) = /// Output = artifactsDir @@ "dotCoverSnapshot.dcvr" }) let DotCoverMerge (setParams: DotCoverMergeParams -> DotCoverMergeParams) = let parameters = (DotCoverMergeDefaults |> setParams) - buildParamsAndExecute parameters buildDotCoverMergeArgs parameters.ToolPath parameters.WorkingDir + buildParamsAndExecute parameters buildDotCoverMergeArgs parameters.ToolPath parameters.WorkingDir false /// Runs the dotCover "report" command. This generates a report from a dotCover snapshot /// ## Parameters From 46b56382956f488041e507ddc1fed5b6ac219aa6 Mon Sep 17 00:00:00 2001 From: abunk Date: Fri, 30 Oct 2015 08:11:46 +0100 Subject: [PATCH 3/4] Add code to replace new assemblyinfo attributes --- src/app/FakeLib/AssemblyInfoHelper.fs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/FakeLib/AssemblyInfoHelper.fs b/src/app/FakeLib/AssemblyInfoHelper.fs index fbc51dd780c..b63a1484d4b 100644 --- a/src/app/FakeLib/AssemblyInfoHelper.fs +++ b/src/app/FakeLib/AssemblyInfoHelper.fs @@ -206,6 +206,8 @@ type AssemblyInfoReplacementParams = AssemblyVersion : string AssemblyFileVersion : string AssemblyInformationalVersion : string + AssemblyCompany : string + AssemblyCopyright : string AssemblyConfiguration : string AssemblyMetadata : (string * string) list } @@ -215,7 +217,9 @@ let AssemblyInfoReplacementDefaults = AssemblyConfiguration = null AssemblyVersion = null AssemblyFileVersion = null - AssemblyInformationalVersion = null + AssemblyInformationalVersion = null + AssemblyCompany = null + AssemblyCopyright = null AssemblyMetadata = [] } let ReplaceAssemblyInfoVersions param = @@ -246,6 +250,8 @@ let ReplaceAssemblyInfoVersions param = |> replaceAttribute "AssemblyConfiguration" parameters.AssemblyConfiguration |> replaceAttribute "AssemblyFileVersion" parameters.AssemblyFileVersion |> replaceAttribute "AssemblyInformationalVersion" parameters.AssemblyInformationalVersion + |> replaceAttribute "AssemblyCompany" parameters.AssemblyCompany + |> replaceAttribute "AssemblyCopyright" parameters.AssemblyCopyright |> replaceMetadataAttributes parameters.AssemblyMetadata ReadFile parameters.OutputFileName From 806ec69cf913f50949a81539404eca3df471dcbd Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Fri, 30 Oct 2015 15:28:59 +0100 Subject: [PATCH 4/4] RELEASE_NOTES --- RELEASE_NOTES.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 8e4d3554f22..395bc2fc701 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,6 @@ -#### 4.7.0-alpha002 - 15.10.2015 -* Internalized FSharp.Compiler.Service.dll in FakeLib.dll +#### 4.7.0 - 30.10.2015 +* Option ignore failing tests DotCover https://github.com/fsharp/FAKE/pull/990 +* Add code to replace new assemblyinfo attributes - https://github.com/fsharp/FAKE/pull/991 * Cleanup Registry helpers - https://github.com/fsharp/FAKE/pull/980 * FAKE.Deploy scans for default scripts - https://github.com/fsharp/FAKE/pull/981 * BUGFIX: support caching even when running RazorEngine as part of the build script - https://github.com/fsharp/FAKE/pull/979