diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 0989c3221cb..768ad6e42d0 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,11 @@ # Release Notes +## 5.6.1 - 2018-09-09 + +* BUGFIX: dotnet restore with configfile did not work - https://github.com/fsharp/FAKE/issues/2082 +* BUGFIX: Fake cache was broken - https://github.com/fsharp/FAKE/issues/2083 +* DOCS: various improvements in the documentation - https://github.com/fsharp/FAKE/pull/2081 + ## 5.6.0 - 2018-09-09 * NEW: Fake.DotNet.Testing.DotCover module - https://github.com/fsharp/FAKE/pull/2058 diff --git a/build.fsx b/build.fsx index fc774d63960..073aa646b19 100644 --- a/build.fsx +++ b/build.fsx @@ -95,16 +95,10 @@ let legacyDir = srcDir"legacy" let nuget_exe = Directory.GetCurrentDirectory() "packages" "build" "NuGet.CommandLine" "tools" "NuGet.exe" -// until bugfix in Vault.fs is released -#load "src/app/Fake.Core.Vault/Vault.fs" - -let vault = Vault.fromFakeEnvironmentVariable() - (* - let envVar = "FAKE_VAULT_VARIABLES" - let vars = Environment.environVarOrDefault envVar "" - if System.String.IsNullOrEmpty vars then - TeamFoundation.variables - else Vault.fromEnvironmentVariable envVar*) +let vault = + match Vault.fromFakeEnvironmentOrNone() with + | Some v -> v + | None -> TeamFoundation.variables let getVarOrDefault name def = match vault.TryGet name with @@ -166,26 +160,6 @@ let chocoVersion = Trace.setBuildNumber nugetVersion -// TODO: Get rid of me -let private publishTests runnerType (resultsFiles:string seq) (mergeResults:bool) (platform:string) (config:string) (runTitle:string) (publishRunAttachments:bool) = - TeamFoundation.write "results.publish" - [ yield "type", runnerType - if mergeResults then - yield "mergeResults", "true" - if String.isNotNullOrEmpty platform then - yield "platform", platform - if String.isNotNullOrEmpty config then - yield "config", config - if String.isNotNullOrEmpty runTitle then - yield "runTitle", runTitle - if publishRunAttachments then - yield "publishRunAttachments", "true" - if not (Seq.isEmpty resultsFiles) then - yield "resultFiles", System.String.Join(",", resultsFiles |> Seq.map Path.GetFullPath) - yield "testRunSystem", "VSTSTask" ] - "" - - let dotnetSdk = lazy DotNet.install DotNet.Versions.Release_2_1_302 let inline dtntWorkDir wd = DotNet.Options.lift dotnetSdk.Value @@ -569,16 +543,14 @@ Target.create "DotNetCoreIntegrationTests" (fun _ -> let processResult = DotNet.exec (dtntWorkDir root) "src/test/Fake.Core.IntegrationTests/bin/Release/netcoreapp2.1/Fake.Core.IntegrationTests.dll" "--summary" if processResult.ExitCode <> 0 then failwithf "DotNet Core Integration tests failed." - //Trace.publish (ImportData.Nunit NunitDataVersion.Nunit) "Fake_Core_IntegrationTests.TestResults.xml" - publishTests "NUnit" ["Fake_Core_IntegrationTests.TestResults.xml"] false "" "" "" true + Trace.publish (ImportData.Nunit NunitDataVersion.Nunit) "Fake_Core_IntegrationTests.TestResults.xml" ) Target.create "TemplateIntegrationTests" (fun _ -> let processResult = DotNet.exec (dtntWorkDir (srcDir "test" "Fake.DotNet.Cli.IntegrationTests")) "bin/Release/netcoreapp2.1/Fake.DotNet.Cli.IntegrationTests.dll" "--summary" if processResult.ExitCode <> 0 then failwithf "DotNet CLI Template Integration tests failed." - //Trace.publish (ImportData.Nunit NunitDataVersion.Nunit) "Fake_DotNet_Cli_IntegrationTests.TestResults.xml" - publishTests "NUnit" ["Fake_DotNet_Cli_IntegrationTests.TestResults.xml"] false "" "" "" true + Trace.publish (ImportData.Nunit NunitDataVersion.Nunit) "Fake_DotNet_Cli_IntegrationTests.TestResults.xml" ) Target.create "DotNetCoreUnitTests" (fun _ -> @@ -587,16 +559,14 @@ Target.create "DotNetCoreUnitTests" (fun _ -> DotNet.exec (dtntWorkDir root) "src/test/Fake.Core.UnitTests/bin/Release/netcoreapp2.1/Fake.Core.UnitTests.dll" "--summary" if processResult.ExitCode <> 0 then failwithf "Unit-Tests failed." - //Trace.publish (ImportData.Nunit NunitDataVersion.Nunit) "Fake_Core_UnitTests.TestResults.xml" - publishTests "NUnit" ["Fake_Core_UnitTests.TestResults.xml"] false "" "" "" true + Trace.publish (ImportData.Nunit NunitDataVersion.Nunit) "Fake_Core_UnitTests.TestResults.xml" // dotnet run --project src/test/Fake.Core.CommandLine.UnitTests/Fake.Core.CommandLine.UnitTests.fsproj let processResult = DotNet.exec (dtntWorkDir root) "src/test/Fake.Core.CommandLine.UnitTests/bin/Release/netcoreapp2.1/Fake.Core.CommandLine.UnitTests.dll" "--summary" if processResult.ExitCode <> 0 then failwithf "Unit-Tests for Fake.Core.CommandLine failed." - //Trace.publish (ImportData.Nunit NunitDataVersion.Nunit) "Fake_Core_CommandLine_UnitTests.TestResults.xml" - publishTests "NUnit" ["Fake_Core_CommandLine_UnitTests.TestResults.xml"] false "" "" "" true + Trace.publish (ImportData.Nunit NunitDataVersion.Nunit) "Fake_Core_CommandLine_UnitTests.TestResults.xml" ) Target.create "BootstrapTestDotNetCore" (fun _ -> @@ -610,7 +580,6 @@ Target.create "BootstrapTestDotNetCore" (fun _ -> [ ".fake/testbuild.fsx/packages" ".fake/testbuild.fsx/paket.depedencies.sha1" ".fake/testbuild.fsx/paket.lock" - ".fake/testbuild.fsx/assemblies.cached" "testbuild.fsx.lock" ] |> List.iter Shell.rm_rf // TODO: Clean a potentially cached dll as well. diff --git a/help/content/pics/buildserver/AppVeyor_imported_tests.png b/help/content/pics/buildserver/AppVeyor_imported_tests.png new file mode 100644 index 00000000000..09bd469ffe5 Binary files /dev/null and b/help/content/pics/buildserver/AppVeyor_imported_tests.png differ diff --git a/help/markdown/buildserver.md b/help/markdown/buildserver.md index ded7199a497..a117b19b2d0 100644 --- a/help/markdown/buildserver.md +++ b/help/markdown/buildserver.md @@ -38,7 +38,7 @@ CoreTracing.ensureConsoleListener () Target.create "Test" (fun _ -> File.WriteAllText("myfile.txt", "some content") - // traceTag can be used to open scopes/blocks. They will be shown in the build-server visualization supported. + // traceTag can be used to open scopes/blocks. They will be shown in the build-server visualization if supported. ( use testsuite = Trace.traceTag (KnownTags.TestSuite "some-testsuite") "Starting unit test" ( use _ = Trace.traceTag (KnownTags.Test "some-test") "Starting unit test 1" // Scope of the test @@ -50,6 +50,11 @@ Target.create "Test" (fun _ -> // Uploads an artifact no matter the build-server Trace.publish ImportData.BuildArtifact "myfile.txt" + // Uploads test results no matter the build-server + // Note: There might be limitations on some system with some imports. + // Please help by testing, submitting issues and pull requests. + Trace.publish (ImportData.Nunit NunitDataVersion.Nunit) "Fake_Core_CommandLine_UnitTests.TestResults.xml" + Trace.setBuildNumber "my-build-number" Trace.traceImportant "tries to write in yellow" @@ -64,3 +69,19 @@ Target.create "Test" (fun _ -> ## Implementing support for a build-server Please look at the existing implementations. Please contribute new implementations to the repository. Some changes like adding new cases to the `TraceListener` module are not considered breaking changes. Using these types (using `match` on these types to be exact) outside the fake repository is not considered good practice. + +## Example FAKE repository + +Fake itself uses AppVeyor and TeamFoundation support for importing and displaying test results: + +```fsharp +// import test result +Trace.publish (ImportData.Nunit NunitDataVersion.Nunit) "Fake_Core_CommandLine_UnitTests.TestResults.xml" + +// upload artifacts +Trace.publish ImportData.BuildArtifact ("release/dotnetcore/fake-dotnetcore-win7-x64.zip") +``` + +Look at this [CI-build](https://fakebuild.visualstudio.com/FSProjects/FSProjects%20Team/_build/results?buildId=425) for an example on how it looks in VSTS. + +![AppVeyor test import](/pics/buildserver/AppVeyor_imported_tests.png) diff --git a/help/markdown/contributing.md b/help/markdown/contributing.md index c3afae8eb3c..a206870e5d0 100644 --- a/help/markdown/contributing.md +++ b/help/markdown/contributing.md @@ -132,7 +132,7 @@ e.g: Using dotnet cli e.g: If you wanted to test a local build of Fake.DotNet.NuGet - #r "paket: + #r "paket: source path/to/Fake.DotNet.NuGet/bin/Debug/ source https://api.nuget.org/v3/index.json ...Other Dependencies... @@ -156,6 +156,8 @@ If you ever need a release/bugfix fast, make sure to mention that in your PR, we Those bits should be considered for "unblocking"-purposes or testing only. +The [release process](https://fakebuild.visualstudio.com/FSProjects/_releases2?definitionId=1&view=mine&_a=releases) is publicly available as well. + ## General considerations * Fake 4 (FakeLib) is in maintainance mode. Therefore new features need to be at least available as new FAKE 5 module (that might mean that the old module needs to be migrated as part of the PR). diff --git a/help/markdown/fake-dotnetcore.md b/help/markdown/fake-dotnetcore.md index 5dd83e1b4ce..02ac57df63a 100644 --- a/help/markdown/fake-dotnetcore.md +++ b/help/markdown/fake-dotnetcore.md @@ -78,17 +78,35 @@ See [Fake command line](fake-commandline.html) AppVeyor: [https://github.com/fsharp/FAKE/blob/master/appveyor.yml](https://github.com/fsharp/FAKE/blob/master/appveyor.yml) Travis: [https://github.com/fsharp/FAKE/blob/master/.travis.yml](https://github.com/fsharp/FAKE/blob/master/.travis.yml) -## Why? - -The goals are: - -- Provide a easy to use cross platform way to use FAKE. With a good bootstrapping experience -- Cleanup 'FakeLib' -- Extract reusable libraries and make them usable for your projects or the fsi! -- Make it easier to extend FAKE for your own use-case -- Provide an easy way for simple scripting, automate everything, everywhere. - -Please read https://github.com/fsharp/FAKE/issues/1232 +## One note on Intellisense + +This section is to clarify when an how the intellisense updates when you add new modules (short form: Delete the `