From 8bfa0f15c49013b5b2845c0e1df69913f6e66225 Mon Sep 17 00:00:00 2001 From: Luiz Henrique Cassettari Date: Mon, 13 May 2024 16:22:22 -0300 Subject: [PATCH] Update `AssemblyExtension` methods to `Obsolete` --- CHANGELOG.md | 1 + ricaun.Nuke/Extensions/AssemblyExtension.cs | 16 +++------------- ricaun.Nuke/ricaun.Nuke.csproj | 2 +- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09e661e..84102f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Updated - Update `GetFileVersionInfo` to find `exe` file. - Update `SignProject` to sign `Name`, `AssemblyName`, or `*`. +- Update `AssemblyExtension` methods to `Obsolete`. ## [1.8.0] / 2023-03-11 ### Updated diff --git a/ricaun.Nuke/Extensions/AssemblyExtension.cs b/ricaun.Nuke/Extensions/AssemblyExtension.cs index 00684fb..47310e6 100644 --- a/ricaun.Nuke/Extensions/AssemblyExtension.cs +++ b/ricaun.Nuke/Extensions/AssemblyExtension.cs @@ -218,19 +218,6 @@ public static void ShowInformation(this Project project) Serilog.Log.Information($"GetFileDescription: {project.GetFileDescription()}"); Serilog.Log.Information($"-"); - //var ass = project.GetAssemblyGreaterVersion(); - - //Serilog.Log.Information($"-"); - //Serilog.Log.Information($"GetInformationalVersion: {ass.GetInformationalVersion()}"); - //Serilog.Log.Information($"GetVersion: {ass.GetVersion()}"); - //Serilog.Log.Information($"GetFileVersion: {ass.GetFileVersion()}"); - //Serilog.Log.Information($"GetTitle: {ass.GetTitle()}"); - //Serilog.Log.Information($"GetTrademark: {ass.GetTrademark()}"); - //Serilog.Log.Information($"GetCompany: {ass.GetCompany()}"); - //Serilog.Log.Information($"GetProduct: {ass.GetProduct()}"); - //Serilog.Log.Information($"GetCopyright: {ass.GetCopyright()}"); - //Serilog.Log.Information($"GetDescription: {ass.GetDescription()}"); - //Serilog.Log.Information($"-"); } /// @@ -238,6 +225,7 @@ public static void ShowInformation(this Project project) /// /// /// + [Obsolete("This method uses `Assembly` and will be remove.")] public static string GetLastTargetFrameworkVersion(this Project project) { var target = project.GetAssemblyLastCreated().GetTargetFramework(); @@ -261,6 +249,7 @@ public static string GetLastTargetFrameworkVersion(this Project project) /// /// /// + [Obsolete("This method uses `Assembly` and will be remove.")] public static Assembly GetAssemblyGreaterVersion(this Project project) { return GetAssemblyGreaterVersion(project.Directory, $"*{project.Name}*.dll"); @@ -299,6 +288,7 @@ private static Assembly GetAssemblyGreaterVersion(string sourceDir, string searc /// /// /// + [Obsolete("This method uses `Assembly` and will be remove.")] public static Assembly GetAssemblyLastCreated(this Project project) { return GetAssemblyLastCreated(project.Directory, $"*{project.Name}*.dll"); diff --git a/ricaun.Nuke/ricaun.Nuke.csproj b/ricaun.Nuke/ricaun.Nuke.csproj index 8bcd181..2424a32 100644 --- a/ricaun.Nuke/ricaun.Nuke.csproj +++ b/ricaun.Nuke/ricaun.Nuke.csproj @@ -7,7 +7,7 @@ ricaun.Nuke - 1.8.1-beta + 1.8.1-beta.1