From f0482e33a81ca9b71d2167cb43ced28c3b59b948 Mon Sep 17 00:00:00 2001 From: Jamie Phillips Date: Fri, 2 Aug 2019 20:36:53 -0400 Subject: [PATCH] Upgrading everything to newer version and standardizing. This fixes #17. --- LICENSE.md | 2 +- build.ps1 | 2 +- nuspec/nuget/Cake.Ftp.nuspec | 23 --- setup.cake => recipe.cake | 10 +- src/Cake.Ftp.Tests/Cake.Ftp.Tests.csproj | 14 +- src/Cake.Ftp/Cake.Ftp.csproj | 21 ++- src/Cake.Ftp/Cake.Ftp.xml | 215 ----------------------- tools/packages.config | 2 +- 8 files changed, 29 insertions(+), 260 deletions(-) delete mode 100644 nuspec/nuget/Cake.Ftp.nuspec rename setup.cake => recipe.cake (69%) delete mode 100644 src/Cake.Ftp/Cake.Ftp.xml diff --git a/LICENSE.md b/LICENSE.md index 1ba6efc..256e393 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2016 Jamie Phillips + Copyright 2016-Present Jamie Phillips Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/build.ps1 b/build.ps1 index 3e18cea..244202c 100644 --- a/build.ps1 +++ b/build.ps1 @@ -40,7 +40,7 @@ http://cakebuild.net [CmdletBinding()] Param( - [string]$Script = "setup.cake", + [string]$Script = "recipe.cake", [string]$Target = "Default", [ValidateSet("Release", "Debug")] [string]$Configuration = "Release", diff --git a/nuspec/nuget/Cake.Ftp.nuspec b/nuspec/nuget/Cake.Ftp.nuspec deleted file mode 100644 index b9fbaef..0000000 --- a/nuspec/nuget/Cake.Ftp.nuspec +++ /dev/null @@ -1,23 +0,0 @@ - - - - Cake.Ftp - 0.0.0 - Cake.Ftp - Jamie Phillips - Jamie Phillips - https://github.com/cake-contrib/Cake.Ftp/blob/develop/LICENSE.md - https://github.com/cake-contrib/Cake.Ftp - https://cdn.rawgit.com/cake-contrib/graphics/a5cf0f881c390650144b2243ae551d5b9f836196/png/cake-contrib-medium.png - false - Cake Addin for working with FTP from a Cake script. - Release - Copyright (c) Jamie Phillips 2016 - Present - CakeFtp, Cake, Ftp, Script, Build, Addin - - - - - - - diff --git a/setup.cake b/recipe.cake similarity index 69% rename from setup.cake rename to recipe.cake index 1d7571f..cf66a54 100644 --- a/setup.cake +++ b/recipe.cake @@ -1,4 +1,4 @@ -#load nuget:https://www.myget.org/F/cake-contrib/api/v2?package=Cake.Recipe&prerelease +#load nuget:?package=Cake.Recipe&version=1.0.0 Environment.SetVariableNames(); @@ -10,14 +10,16 @@ BuildParameters.SetParameters(context: Context, repositoryName: "Cake.Ftp", appVeyorAccountName: "cakecontrib", shouldRunDupFinder: false, - shouldRunInspectCode: false); + shouldRunInspectCode: false, + shouldRunGitVersion: DirectoryExists(".git"), // This would allow building even without using a git repository + shouldRunDotNetCorePack: true); BuildParameters.PrintParameters(Context); ToolSettings.SetToolSettings(context: Context, dupFinderExcludePattern: new string[] { BuildParameters.RootDirectoryPath + "/src/Cake.Ftp.Tests/*.cs" }, - testCoverageFilter: "+[*]* -[xunit.*]* -[Cake.Core]* -[Cake.Testing]* -[*.Tests]* ", + testCoverageFilter: "+[*]* -[xunit.*]* -[Cake.Core]* -[Cake.Testing]* -[*.Tests]* -[FluentAssertions]* -[Microsoft.Build.*]*", testCoverageExcludeByAttribute: "*.ExcludeFromCodeCoverage*", - testCoverageExcludeByFile: "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs"); + testCoverageExcludeByFile: "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs;"); Build.RunDotNetCore(); diff --git a/src/Cake.Ftp.Tests/Cake.Ftp.Tests.csproj b/src/Cake.Ftp.Tests/Cake.Ftp.Tests.csproj index 7af455f..49c854a 100644 --- a/src/Cake.Ftp.Tests/Cake.Ftp.Tests.csproj +++ b/src/Cake.Ftp.Tests/Cake.Ftp.Tests.csproj @@ -1,4 +1,4 @@ - + netcoreapp2.1 @@ -7,12 +7,12 @@ - - - - - - + + + + + + all runtime; build; native; contentfiles; analyzers diff --git a/src/Cake.Ftp/Cake.Ftp.csproj b/src/Cake.Ftp/Cake.Ftp.csproj index 545b41a..57de354 100644 --- a/src/Cake.Ftp/Cake.Ftp.csproj +++ b/src/Cake.Ftp/Cake.Ftp.csproj @@ -1,19 +1,24 @@ - + netstandard2.0 + true - - C:\Users\cphil\code\Cake.Ftp\src\Cake.Ftp\Cake.Ftp.xml - - - - C:\Users\cphil\code\Cake.Ftp\src\Cake.Ftp\Cake.Ftp.xml + + Jamie Phillips + Copyright © 2016-$([System.DateTime]::Now.Year) - Jamie Phillips + Cake Addin for working with FTP from a Cake script. + https://cdn.jsdelivr.net/gh/cake-contrib/graphics/png/cake-contrib-medium.png + Apache-2.0 + https://github.com/cake-contrib/Cake.Ftp + Cake;Script;Build;FTP;Addin + $(PackageProjectUrl).git + git - + diff --git a/src/Cake.Ftp/Cake.Ftp.xml b/src/Cake.Ftp/Cake.Ftp.xml deleted file mode 100644 index b636748..0000000 --- a/src/Cake.Ftp/Cake.Ftp.xml +++ /dev/null @@ -1,215 +0,0 @@ - - - - Cake.Ftp - - - - - Extension methods. - - - - - Throws an exception if the specified parameter's value is null. - - The type of the parameter. - The value of the argument. - The name of the parameter to include in any thrown exception. - Thrown if is null - - - - Throws an exception if the specified parameter's value is null, empty or consists only of white-space characters. - - The value of the argument. - The name of the parameter to include in any thrown exception. - Thrown if is null - Thrown if is empty or consists only of white-space characters - - - - Throws an exception if the specified parameter's value does not match FTP URI scheme. - - The value of the argument. - The name of the parameter to include in any thrown exception. - Thrown if is null - Thrown if is empty or consists only of white-space characters - - - - Contains functionality for working with FTP - - - - - Uploads the file to the FTP server using the supplied credentials. - - - - Task("UploadFile") - .Does(() => { - var fileToUpload = File("some.txt"); - FtpUploadFile("ftp://myserver/random/test.htm", fileToUpload, "some-user", "some-password"); - }); - - - The context. - FTP URI requring FTP:// scehma. - The file to be uploaded. - Username of the FTP account. - Password of the FTP account. - - - - Uploads the file to the FTP server using the supplied credentials. - - - - Task("UploadFile") - .Does(() => { - var fileToUpload = File("some.txt"); - var settings = new FtpSettings() {Username = "some-user", Password = "some-password"}; - FtpUploadFile("ftp://myserver/random/test.htm", fileToUpload, settings); - }); - - - The context. - FTP URI requring FTP:// scehma. - The file to be uploaded. - The settings. - - - - Delets the file on the FTP server using the supplied credentials. - - - - Task("DeleteFile") - .Does(() => { - FtpDeleteFile("ftp://myserver/random/test.htm", "some-user", "some-password"); - }); - - - The context. - FTP URI requring FTP:// scehma. - Username of the FTP account. - Password of the FTP account. - - - - Delets the file on the FTP server using the supplied credentials. - - - - Task("DeleteFile") - .Does(() => { - var settings = new FtpSettings() {Username = "some-user", Password = "some-password"}; - FtpDeleteFile("ftp://myserver/random/test.htm", settings); - }); - - - The context. - FTP URI requring FTP:// scehma. - The settings. - - - - The FTP Client. - - - - - Constructor - - The filesystem. - The cake environment. - The FTP Service. - - - - Uploads file to specified location using the supplied credentials. - - FTP Service URI. - The file to upload. - The settings. - - - - Deletes a file at the specified URI. - - FTP File URI. - The settings. - - - - Contains settings used by - - - - - Gets or sets the FTP username. - - - - - Gets or sets the FTP password. - - - - - The FTP Service. - - - - - Intializes a new instance of the class. - - - - - - Uploads a file. - - The URI for the FTP server. - The file to upload. - The FTP username. - The FTP password. - - - - Deletes a file. - - The URI for the FTP server. - The FTP username. - The FTP password. - - - - Interface for the class. - - - - - Uploads a file. - - The URI for the FTP server. - The file to upload. - The FTP username. - The FTP password. - - - - Deletes a file. - - The URI for the FTP server. - The FTP username. - The FTP password. - - - - Indicates to Code Analysis that a method validates a particular parameter. - - - - diff --git a/tools/packages.config b/tools/packages.config index 0501888..f27ab48 100644 --- a/tools/packages.config +++ b/tools/packages.config @@ -1,4 +1,4 @@ - +