diff --git a/LICENSE.md b/LICENSE.md index 4f592f86be9..38c2a5a02c3 100755 --- a/LICENSE.md +++ b/LICENSE.md @@ -2,20 +2,20 @@ date: 2023-07-13T05:44:46:00-05:00Z description: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, yadda, yadda, yadda... keywords: -- IP -- copyright -- license -- mit + - IP + - copyright + - license + - mit permissions: -- commercial-use -- modifications -- distribution -- private-use + - commercial-use + - modifications + - distribution + - private-use conditions: -- include-copyright + - include-copyright limitations: -- liability -- warranty + - liability + - warranty lastmod: 2024-01-0T00:39:00.0000+05:00Z license: MIT slug: mit-license @@ -32,4 +32,3 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/Tasks/DeleteAndPush.cs b/Tasks/DeleteAndPush.cs index adae26aae86..d2fd62cd041 100644 --- a/Tasks/DeleteAndPush.cs +++ b/Tasks/DeleteAndPush.cs @@ -22,7 +22,7 @@ public class DeleteAndPush : NuGetTaskBase public override bool Execute() { new DeletePackage(TaskResources, HelpKeywordPrefix) { Source = Source, ApiKey = this.ApiKey, PackageId = PackageId, Version = Version, MSBuildProjectDirectory = MSBuildProjectDirectory }.Execute(); - new Push(TaskResources, HelpKeywordPrefix) { Source = Source, ApiKey = ApiKey, PackagePath = PackagePath, MSBuildProjectDirectory = MSBuildProjectDirectory }.Execute(); + new Push(TaskResources, HelpKeywordPrefix) { Source = Source, ApiKey = ApiKey, PackagePath = PackagePath, MSBuildProjectDirectory = MSBuildProjectDirectory }.Execute(); return true; } } diff --git a/Tasks/NuGetMSBuildLogger.cs b/Tasks/NuGetMSBuildLogger.cs index 7a47f0e31a3..eb3babdf69b 100644 --- a/Tasks/NuGetMSBuildLogger.cs +++ b/Tasks/NuGetMSBuildLogger.cs @@ -9,50 +9,50 @@ namespace NuGetPush.Tasks; public class NuGetMSBuildTaskLogger(MSBTask task) : NuGet.Common.ILogger { - public void LogDebug(string data) => LogMessage(MessageImportance.Low, data); - - public void LogVerbose(string data) => LogMessage(MessageImportance.Low, data); - - public void LogInformation(string data) => LogMessage(MessageImportance.Low, data); - - public void LogMinimal(string data) => LogMessage(MessageImportance.Low, data); - - public void LogWarning(string data) => LogMessage(MessageImportance.High, data); - - public void LogError(string data) => LogMessage(MessageImportance.High, data); - - public void LogInformationSummary(string data) => LogMessage(MessageImportance.Low, data); - - public void Log(LogLevel level, string data) => LogMessage(data); - - public TTask LogAsync(LogLevel level, string data) - { - LogMessage(MessageImportance.Low, data); - return TTask.CompletedTask; - } - - public void Log(ILogMessage message) => LogMessage(message.ToString()); - - public TTask LogAsync(ILogMessage message) - { - LogMessage(message.ToString()); - return TTask.CompletedTask; - } - - protected MSBTask Task => task; - protected IBuildEngine BuildEngine=> Task.BuildEngine; - - protected void LogMessage(string message) => LogMessage(MessageImportance.Low, message); - - protected void LogMessage(MessageImportance importance, string message, params object[] messageArgs) - { - var e = new BuildMessageEventArgs( - message, - helpKeyword: null, - senderName: Task.GetType().Name, - importance, - DateTime.UtcNow, - messageArgs); - BuildEngine.LogMessageEvent(e); - } + public void LogDebug(string data) => LogMessage(MessageImportance.Low, data); + +public void LogVerbose(string data) => LogMessage(MessageImportance.Low, data); + +public void LogInformation(string data) => LogMessage(MessageImportance.Low, data); + +public void LogMinimal(string data) => LogMessage(MessageImportance.Low, data); + +public void LogWarning(string data) => LogMessage(MessageImportance.High, data); + +public void LogError(string data) => LogMessage(MessageImportance.High, data); + +public void LogInformationSummary(string data) => LogMessage(MessageImportance.Low, data); + +public void Log(LogLevel level, string data) => LogMessage(data); + +public TTask LogAsync(LogLevel level, string data) +{ + LogMessage(MessageImportance.Low, data); + return TTask.CompletedTask; +} + +public void Log(ILogMessage message) => LogMessage(message.ToString()); + +public TTask LogAsync(ILogMessage message) +{ + LogMessage(message.ToString()); + return TTask.CompletedTask; +} + +protected MSBTask Task => task; +protected IBuildEngine BuildEngine => Task.BuildEngine; + +protected void LogMessage(string message) => LogMessage(MessageImportance.Low, message); + +protected void LogMessage(MessageImportance importance, string message, params object[] messageArgs) +{ + var e = new BuildMessageEventArgs( + message, + helpKeyword: null, + senderName: Task.GetType().Name, + importance, + DateTime.UtcNow, + messageArgs); + BuildEngine.LogMessageEvent(e); +} } diff --git a/Tasks/NuGetTaskBase.cs b/Tasks/NuGetTaskBase.cs index 694a246bf09..a700ade56bb 100644 --- a/Tasks/NuGetTaskBase.cs +++ b/Tasks/NuGetTaskBase.cs @@ -26,7 +26,7 @@ public NuGetTaskBase() : base() { } protected PackageSourceProvider PackageSourceProvider => new(Settings); private NuGetMSBuildTaskLogger? _logger; - public virtual NuGetMSBuildTaskLogger Logger { get => _logger ??= new (this); set => _logger = value; } + public virtual NuGetMSBuildTaskLogger Logger { get => _logger ??= new(this); set => _logger = value; } private string? _apiKey; public virtual string ApiKey diff --git a/TestPush/LICENSE.md b/TestPush/LICENSE.md index 4f592f86be9..38c2a5a02c3 100644 --- a/TestPush/LICENSE.md +++ b/TestPush/LICENSE.md @@ -2,20 +2,20 @@ date: 2023-07-13T05:44:46:00-05:00Z description: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, yadda, yadda, yadda... keywords: -- IP -- copyright -- license -- mit + - IP + - copyright + - license + - mit permissions: -- commercial-use -- modifications -- distribution -- private-use + - commercial-use + - modifications + - distribution + - private-use conditions: -- include-copyright + - include-copyright limitations: -- liability -- warranty + - liability + - warranty lastmod: 2024-01-0T00:39:00.0000+05:00Z license: MIT slug: mit-license @@ -32,4 +32,3 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -