From d92c06267117bd405f349881bd53f92aacadab98 Mon Sep 17 00:00:00 2001 From: Matthias Dittrich Date: Sun, 9 Feb 2020 13:07:50 +0100 Subject: [PATCH] `dotnet-fake` cli tool via `DotNetCliToolReference` is now history - https://github.com/fsharp/FAKE/issues/2465 --- Fake.sln | 15 ----------- RELEASE_NOTES.md | 5 +--- build.fsx | 3 +-- help/markdown/fake-gettingstarted.md | 4 --- help/markdown/fake-template.md | 3 +-- src/app/Fake.Runtime/FakeRuntimeHints.fs | 4 --- src/app/Fake.Tools.Octo/Octo.fs | 2 +- src/app/dotnet-fake/dotnet-fake.fsproj | 26 ------------------- src/app/dotnet-fake/paket.references | 7 ----- .../Content/.config/dotnet-tools.json | 2 +- .../Content/.template.config/template.json | 11 ++------ src/template/fake-template/Content/build.proj | 14 ---------- .../fake-template/Content/fake.proj.cmd | 2 -- .../fake-template/Content/fake.proj.sh | 7 ----- .../TemplateTests.fs | 26 +------------------ 15 files changed, 8 insertions(+), 123 deletions(-) delete mode 100644 src/app/dotnet-fake/dotnet-fake.fsproj delete mode 100644 src/app/dotnet-fake/paket.references delete mode 100644 src/template/fake-template/Content/build.proj delete mode 100644 src/template/fake-template/Content/fake.proj.cmd delete mode 100644 src/template/fake-template/Content/fake.proj.sh diff --git a/Fake.sln b/Fake.sln index 1efeafee4ce..0e5fc1af42a 100644 --- a/Fake.sln +++ b/Fake.sln @@ -77,8 +77,6 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.DotNet.Xamarin", "src\ EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.Net.Http", "src\app\Fake.Net.Http\Fake.Net.Http.fsproj", "{D24CEE35-B6C0-4C92-AE18-E80F90B69974}" EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "dotnet-fake", "src\app\dotnet-fake\dotnet-fake.fsproj", "{DB27F0BB-D546-42B2-85DA-52870B4424FD}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{CCAC5CAB-03C8-4C11-ADBE-A0D05F6A4F18}" EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.Core.UnitTests", "src\test\Fake.Core.UnitTests\Fake.Core.UnitTests.fsproj", "{31A5759B-B562-43C0-A845-14EFA4091543}" @@ -627,18 +625,6 @@ Global {D24CEE35-B6C0-4C92-AE18-E80F90B69974}.Release|x64.Build.0 = Release|Any CPU {D24CEE35-B6C0-4C92-AE18-E80F90B69974}.Release|x86.ActiveCfg = Release|Any CPU {D24CEE35-B6C0-4C92-AE18-E80F90B69974}.Release|x86.Build.0 = Release|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Debug|x64.ActiveCfg = Debug|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Debug|x64.Build.0 = Debug|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Debug|x86.ActiveCfg = Debug|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Debug|x86.Build.0 = Debug|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Release|Any CPU.Build.0 = Release|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Release|x64.ActiveCfg = Release|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Release|x64.Build.0 = Release|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Release|x86.ActiveCfg = Release|Any CPU - {DB27F0BB-D546-42B2-85DA-52870B4424FD}.Release|x86.Build.0 = Release|Any CPU {31A5759B-B562-43C0-A845-14EFA4091543}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {31A5759B-B562-43C0-A845-14EFA4091543}.Debug|Any CPU.Build.0 = Debug|Any CPU {31A5759B-B562-43C0-A845-14EFA4091543}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1195,7 +1181,6 @@ Global {4BCE4F9C-8FC2-4207-81F1-20CB07D852DC} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} {13C1F95D-2FAD-4890-BF94-0AE7CF9AB2FC} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} {D24CEE35-B6C0-4C92-AE18-E80F90B69974} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} - {DB27F0BB-D546-42B2-85DA-52870B4424FD} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} {31A5759B-B562-43C0-A845-14EFA4091543} = {CCAC5CAB-03C8-4C11-ADBE-A0D05F6A4F18} {D8850C67-0542-427A-ABCB-92174EA42C95} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} {8D72BED1-BC02-4B23-A631-4849BD0FD3E1} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 4d18a39fbdf..d60365b56db 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,11 +1,8 @@ # Release Notes -## 5.19.2-alpha - tbd - -* tbd - ## 5.19.1 - 2019-02-10 +* ANNOUNCEMENT: `dotnet-fake` cli tool via `DotNetCliToolReference` is now history - https://github.com/fsharp/FAKE/issues/2465 * ENHANCEMENT: Update MSTest.fs for VS 2019, thanks @0x53A - https://github.com/fsharp/FAKE/pull/2450 * ENHANCEMENT: Added `CreateProcess.addOnStartedEx` in order to retrieve the .NET Process object, thanks @maciej-izak - https://github.com/fsharp/FAKE/pull/2451 * BUGFIX: Improved error reporting when paket initialization fails, see https://github.com/isaacabraham/vsts-fsharp/issues/33 diff --git a/build.fsx b/build.fsx index 3fc200442ff..edf9bd76c90 100644 --- a/build.fsx +++ b/build.fsx @@ -237,8 +237,7 @@ let common = [ // New FAKE libraries let dotnetAssemblyInfos = - [ "dotnet-fake", "Fake dotnet-cli command line tool" - "fake-cli", "Fake global dotnet-cli command line tool" + [ "fake-cli", "Fake global dotnet-cli command line tool" "Fake.Api.GitHub", "GitHub Client API Support via Octokit" "Fake.Api.HockeyApp", "HockeyApp Integration Support" "Fake.Api.Slack", "Slack Integration Support" diff --git a/help/markdown/fake-gettingstarted.md b/help/markdown/fake-gettingstarted.md index 0140f45c84a..dafac800d3e 100644 --- a/help/markdown/fake-gettingstarted.md +++ b/help/markdown/fake-gettingstarted.md @@ -79,10 +79,6 @@ There are various ways to install FAKE 5:

These scripts have no versioning story. You either need to take care of versions yourself (and lock them) or your builds might break on major releases.

-* (No longer recommended) Use it as a dotnet tool (legacy): Add `` to your dependencies and run `dotnet fake ...` instead of `fake ...`, see [this example](https://github.com/FakeBuild/fake-bootstrap/blob/master/dotnet-fake.csproj) - -* (No longer recommended) Bootstrap via paket `clitool` (legacy), this is basically the same as `DotNetCliToolReference` but managed via paket. See the [`paket_clitool`](https://github.com/FakeBuild/fake-bootstrap/tree/paket_clitool) branch of `fake-bootstrap` in particular the [build.proj](https://github.com/FakeBuild/fake-bootstrap/blob/paket_clitool/build.proj) file. - now you can use
fake --help
diff --git a/help/markdown/fake-template.md b/help/markdown/fake-template.md index 7bd46adbb83..0fa40385d3c 100644 --- a/help/markdown/fake-template.md +++ b/help/markdown/fake-template.md @@ -31,7 +31,6 @@ Specifies your prefered way to bootstrap FAKE. - `local` (default) - Installs the FAKE dotnet sdk local tool into the `dotnet-tools.json` manifest. This requires an dotnet SDK version 3 or higher. - `tool` - Installs the FAKE dotnet sdk global tool into the `--tool-path` folder -- `project` - Creates a `build.proj` and uses `DotNetCliToolReference` to bootstrap FAKE - `none` - Does not bootstrap FAKE. Use this if you want to use a global installation of FAKE ### --dependencies @@ -51,4 +50,4 @@ Specifies your prefered way to define build tasks inside your build script: Specifies the folder for the fake-cli tool. This parameter is only applicable when `tool` option is used for bootstrapping with `--bootstrap`. Defaults to `.fake`. ### --version -Specifies the version of FAKE to install. Defaults to `5.*`. This parameter is only applicable when either `local`, `tool` or `project` is used for bootstrapping. +Specifies the version of FAKE to install. Defaults to `5.*`. This parameter is only applicable when either `local` or `tool` is used for bootstrapping. diff --git a/src/app/Fake.Runtime/FakeRuntimeHints.fs b/src/app/Fake.Runtime/FakeRuntimeHints.fs index 2ad7ede43fa..8e732dd3eda 100644 --- a/src/app/Fake.Runtime/FakeRuntimeHints.fs +++ b/src/app/Fake.Runtime/FakeRuntimeHints.fs @@ -160,10 +160,6 @@ let retrieveHints (prepareInfo:FakeRuntime.PrepareInfo) (context:FakeContext) (r [ if findException (fun e -> e :? MissingMethodException) err then yield { Important = false; Text = "The given error might indicate a problem with the fake cache. Backup the '.fake' directory, delete it and try again. If it works or you need help consider reporting a new issue." } - if err |> findException (function - | :? FileNotFoundException as f when f.Message.Contains "System.Memory" -> true - | _ -> false) then - yield { Important = true; Text = "The error might indicate that you are using dotnet-fake with an incorrect project file.\nTry adding 'netcoreapp2.0' to your project file, see https://github.com/fsharp/FAKE/issues/2097 for details." } if not config.VerboseLevel.PrintVerbose && Environment.GetEnvironmentVariable "FAKE_DETAILED_ERRORS" <> "true" then yield { Important = false; Text = "To further diagnose the problem you can run fake in verbose mode `fake -v run ...` or set the 'FAKE_DETAILED_ERRORS' environment variable to 'true'" } diff --git a/src/app/Fake.Tools.Octo/Octo.fs b/src/app/Fake.Tools.Octo/Octo.fs index 246278386ef..653fb05dee6 100644 --- a/src/app/Fake.Tools.Octo/Octo.fs +++ b/src/app/Fake.Tools.Octo/Octo.fs @@ -134,7 +134,7 @@ type PushOptions = { /// if the package already exists, should this package overwrite it? ReplaceExisting : bool /// Common parameters - Common: Options} + Common: Options } /// Option type for selecting one command type internal Command = diff --git a/src/app/dotnet-fake/dotnet-fake.fsproj b/src/app/dotnet-fake/dotnet-fake.fsproj deleted file mode 100644 index 55d821c0c70..00000000000 --- a/src/app/dotnet-fake/dotnet-fake.fsproj +++ /dev/null @@ -1,26 +0,0 @@ - - - netcoreapp2.0 - $(DefineConstants);CORE_CLR;DOTNETCORE;EXPLICIT_DEPENDENCIES;NETSTANDARD;NETSTANDARD1_6 - Portable - true - dotnet-fake - Exe - - - $(DefineConstants);RELEASE - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/app/dotnet-fake/paket.references b/src/app/dotnet-fake/paket.references deleted file mode 100644 index 8398d870e81..00000000000 --- a/src/app/dotnet-fake/paket.references +++ /dev/null @@ -1,7 +0,0 @@ -group netcorerunner -FSharp.Core - -Paket.Core -Mono.Cecil -Microsoft.NETCore.App -NETStandard.Library \ No newline at end of file diff --git a/src/template/fake-template/Content/.config/dotnet-tools.json b/src/template/fake-template/Content/.config/dotnet-tools.json index c6424f66f78..787b313fb8d 100644 --- a/src/template/fake-template/Content/.config/dotnet-tools.json +++ b/src/template/fake-template/Content/.config/dotnet-tools.json @@ -4,7 +4,7 @@ "tools": { "fake-cli": { //#if (version == "latest") - "version": "5.17.0", + "version": "5.19.0", ////#else //"version": "(version)", //#endif diff --git a/src/template/fake-template/Content/.template.config/template.json b/src/template/fake-template/Content/.template.config/template.json index 5736d8b8a07..f2bdcbab69b 100644 --- a/src/template/fake-template/Content/.template.config/template.json +++ b/src/template/fake-template/Content/.template.config/template.json @@ -16,10 +16,7 @@ "type": "parameter", "dataType": "choice", "defaultValue": "local", - "choices": [{ - "choice": "project", - "description": "Creates a build.proj file to bootstrap FAKE" - }, + "choices": [ { "choice": "tool", "description": "Uses the FAKE dotnet sdk global tool to bootstrap FAKE. The tool is installed into 'tool--path'" @@ -75,7 +72,7 @@ }, "version": { "type": "parameter", - "description": "Version of FAKE to install. This parameter is only applicable when either 'local', 'tool' or 'project' is used for bootstrapping", + "description": "Version of FAKE to install. This parameter is only applicable when either 'local' or 'tool' is used for bootstrapping", "dataType": "string", "defaultValue": "latest", "replaces": "(version)" @@ -108,10 +105,6 @@ "fake.local.cmd": "fake.cmd" } }, - { - "exclude": ["**/fake.proj.*", "**/build.proj"], - "condition": "(bootstrap != \"project\")" - }, { "rename": { "fake.proj.sh": "fake.sh", diff --git a/src/template/fake-template/Content/build.proj b/src/template/fake-template/Content/build.proj deleted file mode 100644 index 507f1db1e72..00000000000 --- a/src/template/fake-template/Content/build.proj +++ /dev/null @@ -1,14 +0,0 @@ - - - netstandard2.0 - - netcoreapp2.0 - - - - - - - - - \ No newline at end of file diff --git a/src/template/fake-template/Content/fake.proj.cmd b/src/template/fake-template/Content/fake.proj.cmd deleted file mode 100644 index ad2f810c373..00000000000 --- a/src/template/fake-template/Content/fake.proj.cmd +++ /dev/null @@ -1,2 +0,0 @@ -dotnet restore build.proj -dotnet fake %* \ No newline at end of file diff --git a/src/template/fake-template/Content/fake.proj.sh b/src/template/fake-template/Content/fake.proj.sh deleted file mode 100644 index 64c37e0b799..00000000000 --- a/src/template/fake-template/Content/fake.proj.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -set -eu -set -o pipefail - -dotnet restore build.proj -dotnet fake "$@" \ No newline at end of file diff --git a/src/test/Fake.DotNet.Cli.IntegrationTests/TemplateTests.fs b/src/test/Fake.DotNet.Cli.IntegrationTests/TemplateTests.fs index ae21d07abe4..158ef7e997b 100644 --- a/src/test/Fake.DotNet.Cli.IntegrationTests/TemplateTests.fs +++ b/src/test/Fake.DotNet.Cli.IntegrationTests/TemplateTests.fs @@ -33,10 +33,9 @@ let installTemplateFrom pathToNupkg = type BootstrapKind = | Tool -| Project | Local | None -with override x.ToString () = match x with | Tool -> "tool" | Project -> "project" | Local -> "local" | None -> "none" +with override x.ToString () = match x with | Tool -> "tool" | Local -> "local" | None -> "none" type DslKind = | Fake @@ -126,29 +125,6 @@ let tests = let buildFile = "build.fsx" let dependenciesFile = "paket.dependencies" - // temporarily disable due to (in Azure CI) - // stdout: Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/dotnet-fake/index.json'. - // stdout: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond - // stdout: Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/dotnet-fake/index.json'. - // stdout: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond - // stdout: C:\Program Files\dotnet\sdk\2.1.508\NuGet.targets(114,5): error : Failed to retrieve information about 'dotnet-fake' from remote source 'https://api.nuget.org/v3-flatcontainer/dotnet-fake/index.json'. [D:\a\1\s\test\fake-template\emvcxqwy.2wf\build.proj] - // stdout: C:\Program Files\dotnet\sdk\2.1.508\NuGet.targets(114,5): error : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [D:\a\1\s\test\fake-template\emvcxqwy.2wf\build.proj] - // stdout: - // stdout: D:\a\1\s\test\fake-template\emvcxqwy.2wf>dotnet fake --help - // stderr: Version for package `dotnet-fake` could not be resolved. - //yield test "can install a project-style template" { - // let tempDir = tempDir() - // runTemplate tempDir Project File Fake - // invokeScript tempDir scriptFile "--help" |> shouldSucceed "should invoke help" - // Expect.isTrue (fileExists tempDir dependenciesFile) "the dependencies file should exist" - //} - - //yield test "can build with the project-style template" { - // let tempDir = tempDir() - // runTemplate tempDir Project File Fake - // invokeScript tempDir scriptFile "build -t All" |> shouldSucceed "should build successfully" - //} - yield test "fails to build a target that doesn't exist" { let tempDir = tempDir() runTemplate tempDir Tool File Fake