Skip to content

Commit

Permalink
Merge pull request #2657 from fsprojects/release/next
Browse files Browse the repository at this point in the history
`5.22.0` release
  • Loading branch information
yazeedobaid authored Feb 14, 2022
2 parents 79aa127 + 16a67a9 commit f826618
Show file tree
Hide file tree
Showing 23 changed files with 826 additions and 100 deletions.
30 changes: 30 additions & 0 deletions Fake.sln
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ 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}") = "Fake.Net.SSH", "src\app\Fake.Net.SSH\Fake.Net.SSH.fsproj", "{5B2A7546-A441-45C9-8176-2872E2A30477}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.Net.FTP", "src\app\Fake.Net.FTP\Fake.Net.FTP.fsproj", "{18C490E3-EA3F-4DC5-87A0-1A02309F8664}"
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}"
Expand Down Expand Up @@ -633,6 +637,30 @@ 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
{5B2A7546-A441-45C9-8176-2872E2A30477}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5B2A7546-A441-45C9-8176-2872E2A30477}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5B2A7546-A441-45C9-8176-2872E2A30477}.Debug|x64.ActiveCfg = Debug|Any CPU
{5B2A7546-A441-45C9-8176-2872E2A30477}.Debug|x64.Build.0 = Debug|Any CPU
{5B2A7546-A441-45C9-8176-2872E2A30477}.Debug|x86.ActiveCfg = Debug|Any CPU
{5B2A7546-A441-45C9-8176-2872E2A30477}.Debug|x86.Build.0 = Debug|Any CPU
{5B2A7546-A441-45C9-8176-2872E2A30477}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5B2A7546-A441-45C9-8176-2872E2A30477}.Release|Any CPU.Build.0 = Release|Any CPU
{5B2A7546-A441-45C9-8176-2872E2A30477}.Release|x64.ActiveCfg = Release|Any CPU
{5B2A7546-A441-45C9-8176-2872E2A30477}.Release|x64.Build.0 = Release|Any CPU
{5B2A7546-A441-45C9-8176-2872E2A30477}.Release|x86.ActiveCfg = Release|Any CPU
{5B2A7546-A441-45C9-8176-2872E2A30477}.Release|x86.Build.0 = Release|Any CPU
{18C490E3-EA3F-4DC5-87A0-1A02309F8664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{18C490E3-EA3F-4DC5-87A0-1A02309F8664}.Debug|Any CPU.Build.0 = Debug|Any CPU
{18C490E3-EA3F-4DC5-87A0-1A02309F8664}.Debug|x64.ActiveCfg = Debug|Any CPU
{18C490E3-EA3F-4DC5-87A0-1A02309F8664}.Debug|x64.Build.0 = Debug|Any CPU
{18C490E3-EA3F-4DC5-87A0-1A02309F8664}.Debug|x86.ActiveCfg = Debug|Any CPU
{18C490E3-EA3F-4DC5-87A0-1A02309F8664}.Debug|x86.Build.0 = Debug|Any CPU
{18C490E3-EA3F-4DC5-87A0-1A02309F8664}.Release|Any CPU.ActiveCfg = Release|Any CPU
{18C490E3-EA3F-4DC5-87A0-1A02309F8664}.Release|Any CPU.Build.0 = Release|Any CPU
{18C490E3-EA3F-4DC5-87A0-1A02309F8664}.Release|x64.ActiveCfg = Release|Any CPU
{18C490E3-EA3F-4DC5-87A0-1A02309F8664}.Release|x64.Build.0 = Release|Any CPU
{18C490E3-EA3F-4DC5-87A0-1A02309F8664}.Release|x86.ActiveCfg = Release|Any CPU
{18C490E3-EA3F-4DC5-87A0-1A02309F8664}.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
Expand Down Expand Up @@ -1261,6 +1289,8 @@ 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}
{5B2A7546-A441-45C9-8176-2872E2A30477} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A}
{18C490E3-EA3F-4DC5-87A0-1A02309F8664} = {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}
Expand Down
7 changes: 7 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Release Notes

## 5.22.0 - 2022-02-14
* ENHANCEMENT: Enhance template tests and add dotnet cli APIs for new command, thanks @yazeedobaid - https://github.com/fsprojects/FAKE/pull/2636
* ENHANCEMENT: Porting SSH module to FAKE 5, thanks @ziadadeela - https://github.com/fsprojects/FAKE/pull/2652
* ENHANCEMENT: Add missing report types, thanks @alcated - https://github.com/fsprojects/FAKE/pull/2654
* ENHANCEMENT: Add known paths for more recent versions of msbuild, thanks @alcated - https://github.com/fsprojects/FAKE/pull/2655
* ENHANCEMENT: Porting FTP module to FAKE 5, thanks @ziadadeela - https://github.com/fsprojects/FAKE/pull/2656

## 5.21.1 - 2022-01-30
* BUGFIX: Update logic of resolving SdkReferenceAssemblies., thanks @nojaf - https://github.com/fsprojects/FAKE/pull/2639
* BUGFIX: Fix FAKE template integration tests., thanks @yazeedobaid - https://github.com/fsprojects/FAKE/pull/2640
Expand Down
2 changes: 2 additions & 0 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,8 @@ let dotnetAssemblyInfos =
"Fake.JavaScript.Yarn", "Running Yarn commands"
"Fake.JavaScript.TypeScript", "Running TypeScript compiler"
"Fake.Net.Http", "HTTP Client"
"Fake.Net.SSH", "SSH operations"
"Fake.Net.FTP", "FTP operations"
"Fake.netcore", "Command line tool"
"Fake.Runtime", "Core runtime features"
"Fake.Sql.DacPac", "Sql Server Data Tools DacPac operations (Obsolete: Use Fake.Sql.SqlPackage instead)"
Expand Down
4 changes: 3 additions & 1 deletion help/templates/template.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@
<a href="/apidocs/v5/index.html#Fake.Net" class="navbar-link">Net</a>
<div class="navbar-dropdown" class="navbar-item">
<a href="/net-http.html" class="navbar-item">Http</a>
</div>
<a href="/apidocs/v5/fake-net-ssh.html" class="navbar-item">SSH</a>
<a href="/apidocs/v5/fake-net-ftp.html" class="navbar-item">FTP</a>
</div>
</div>
<div class="navbar-item has-dropdown is-hoverable">
<a href="/apidocs/v5/index.html#Fake.Sql" class="navbar-link">Sql</a>
Expand Down
152 changes: 152 additions & 0 deletions src/app/Fake.DotNet.Cli/DotNet.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1697,3 +1697,155 @@ module DotNet =
nugetPush (fun _ -> param.WithPushParams { pushParams with PushTrials = pushParams.PushTrials - 1 }) nupkg
else
failwithf "dotnet nuget push failed with code %i" result.ExitCode

/// the languages supported by new command
type NewLanguage =
| FSharp
| CSharp
| VisualBasic

/// Convert the list option to string representation
override this.ToString() =
match this with
| FSharp -> "F#"
| CSharp -> "C#"
| VisualBasic -> "VB"

/// dotnet new command options
type NewOptions =
{
/// Common tool options
Common: Options
// Displays a summary of what would happen if the given command line were run if it would result in a template creation.
DryRun: bool
// Forces content to be generated even if it would change existing files.
Force: bool
// Filters templates based on language and specifies the language of the template to create.
Language: NewLanguage
// The name for the created output. If no name is specified, the name of the current directory is used.
Name: string option
// Disables checking for template package updates when instantiating a template.
NoUpdateCheck: bool
// Location to place the generated output. The default is the current directory.
Output: string option
}

/// Parameter default values.
static member Create() = {
Common = Options.Create()
DryRun = false
Force = false
Language = NewLanguage.FSharp
Name = None
NoUpdateCheck = false
Output = None
}

/// dotnet new --install options
type TemplateInstallOptions =
{
/// Common tool options
Common: Options
Install: string
NugetSource: string option
}

/// Parameter default values.
static member Create(packageOrSourceName) = {
Common = Options.Create()
Install = packageOrSourceName
NugetSource = None
}

/// dotnet new --install options
type TemplateUninstallOptions =
{
/// Common tool options
Common: Options
Uninstall: string
}

/// Parameter default values.
static member Create(packageOrSourceName) = {
Common = { Options.Create() with RedirectOutput = true }
Uninstall = packageOrSourceName
}

/// [omit]
let internal buildNewArgs (param: NewOptions) =
[
param.DryRun |> argOption "dry-run"
param.Force |> argOption "force"
argList2 "language" [param.Language.ToString()]
param.Name |> Option.toList |> argList2 "name"
param.NoUpdateCheck |> argOption "no-update-check"
param.Output |> Option.toList |> argList2 "output"
]
|> List.concat
|> List.filter (not << String.IsNullOrEmpty)

/// [omit]
let internal buildTemplateInstallArgs (param: TemplateInstallOptions) =
[
argList2 "install" [param.Install]
param.NugetSource |> Option.toList |> argList2 "nuget-source"
]
|> List.concat
|> List.filter (not << String.IsNullOrEmpty)

/// [omit]
let internal buildTemplateUninstallArgs (param: TemplateUninstallOptions) =
[
argList2 "uninstall" [param.Uninstall]
]
|> List.concat
|> List.filter (not << String.IsNullOrEmpty)

/// Execute dotnet new command
/// ## Parameters
///
/// - 'templateName' - template short name to create from
/// - 'setParams' - set version command parameters
let newFromTemplate templateName setParams =
use __ = Trace.traceTask "DotNet:new" "dotnet new command"
let param = NewOptions.Create() |> setParams
let args = Args.toWindowsCommandLine(buildNewArgs param)
let result = exec (fun _ -> param.Common) $"new {templateName}" args
if not result.OK then failwithf $"dotnet new failed with code %i{result.ExitCode}"
__.MarkSuccess()

/// Execute dotnet new --install <PATH|NUGET_ID> command to install a new template
/// ## Parameters
///
/// - 'templateName' - template short name to install
/// - 'setParams' - set version command parameters
let installTemplate templateName setParams =
use __ = Trace.traceTask "DotNet:new" "dotnet new --install command"
let param = TemplateInstallOptions.Create(templateName) |> setParams
let args = Args.toWindowsCommandLine(buildTemplateInstallArgs param)
let result = exec (fun _ -> param.Common) "new" args
if not result.OK then failwithf $"dotnet new --install failed with code %i{result.ExitCode}"
__.MarkSuccess()

/// Execute dotnet new --uninstall <PATH|NUGET_ID> command to uninstall a new template
/// ## Parameters
///
/// - 'templateName' - template short name to uninstall
/// - 'setParams' - set version command parameters
let uninstallTemplate templateName =
use __ = Trace.traceTask "DotNet:new" "dotnet new --uninstall command"
let param = TemplateUninstallOptions.Create(templateName)
let args = Args.toWindowsCommandLine(buildTemplateUninstallArgs param)
let result = exec (fun _ -> param.Common) "new" args

// we will check if the uninstall command has returned error and message is template is not found.
// if that is the case, then we will just redirect output as success and change process result to
// exit code of zero.
let templateIsNotFoundToUninstall =
result.Results
|> List.exists(fun (result:ConsoleMessage) -> result.Message.Contains $"The template package '{templateName}' is not found.")

match templateIsNotFoundToUninstall with
| true -> ignore ""
| false -> failwithf $"dotnet new --uninstall failed with code %i{result.ExitCode}"
__.MarkSuccess()
10 changes: 10 additions & 0 deletions src/app/Fake.DotNet.MSBuild/MSBuild.fs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ module private MSBuildExeFromVsWhere =
module private MSBuildExe =
let knownMSBuildEntries =
[
{ Version = "17.0"; Paths = [@"\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin"
@"\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin"
@"\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin"
@"\MSBuild\Current\Bin"
@"\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin"] }
{ Version = "16.0"; Paths = [@"\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"
@"\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin"
@"\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin"
@"\MSBuild\Current\Bin"
@"\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin"] }
{ Version = "15.0"; Paths = [@"\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin"
@"\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin"
@"\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin"
Expand Down
2 changes: 2 additions & 0 deletions src/app/Fake.DotNet.Testing.DotCover/DotCover.fs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ type ReportType =
| Json = 1
| Xml = 2
| NDependXml = 3
| DetailedXml = 4
| SummaryXml = 5

/// The dotCover parameter type for running coverage
type Params =
Expand Down
19 changes: 19 additions & 0 deletions src/app/Fake.Net.FTP/AssemblyInfo.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Auto-Generated by FAKE; do not edit
namespace System
open System.Reflection

[<assembly: AssemblyTitleAttribute("FAKE - F# Make FTP operations")>]
[<assembly: AssemblyProductAttribute("FAKE - F# Make")>]
[<assembly: AssemblyVersionAttribute("5.22.0")>]
[<assembly: AssemblyInformationalVersionAttribute("5.22.0-alpha001.local.3+2022-02-07-14-27")>]
[<assembly: AssemblyFileVersionAttribute("5.22.0")>]
[<assembly: AssemblyMetadataAttribute("BuildDate","2022-02-07")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] AssemblyTitle = "FAKE - F# Make FTP operations"
let [<Literal>] AssemblyProduct = "FAKE - F# Make"
let [<Literal>] AssemblyVersion = "5.22.0"
let [<Literal>] AssemblyInformationalVersion = "5.22.0-alpha001.local.3+2022-02-07-14-27"
let [<Literal>] AssemblyFileVersion = "5.22.0"
let [<Literal>] AssemblyMetadata_BuildDate = "2022-02-07"
Loading

0 comments on commit f826618

Please sign in to comment.