Skip to content

Commit

Permalink
Update AssemblyExtension methods to Obsolete
Browse files Browse the repository at this point in the history
  • Loading branch information
ricaun committed May 13, 2024
1 parent 7c1b796 commit 8bfa0f1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 3 additions & 13 deletions ricaun.Nuke/Extensions/AssemblyExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,26 +218,14 @@ 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($"-");
}

/// <summary>
/// Get Last TargetFramework using <see cref="GetAssemblyLastCreated(Project)"/> and <see cref="GetTargetFramework"/>
/// </summary>
/// <param name="project"></param>
/// <returns></returns>
[Obsolete("This method uses `Assembly` and will be remove.")]
public static string GetLastTargetFrameworkVersion(this Project project)
{
var target = project.GetAssemblyLastCreated().GetTargetFramework();
Expand All @@ -261,6 +249,7 @@ public static string GetLastTargetFrameworkVersion(this Project project)
/// </summary>
/// <param name="project"></param>
/// <returns></returns>
[Obsolete("This method uses `Assembly` and will be remove.")]
public static Assembly GetAssemblyGreaterVersion(this Project project)
{
return GetAssemblyGreaterVersion(project.Directory, $"*{project.Name}*.dll");
Expand Down Expand Up @@ -299,6 +288,7 @@ private static Assembly GetAssemblyGreaterVersion(string sourceDir, string searc
/// </summary>
/// <param name="project"></param>
/// <returns></returns>
[Obsolete("This method uses `Assembly` and will be remove.")]
public static Assembly GetAssemblyLastCreated(this Project project)
{
return GetAssemblyLastCreated(project.Directory, $"*{project.Name}*.dll");
Expand Down
2 changes: 1 addition & 1 deletion ricaun.Nuke/ricaun.Nuke.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<PropertyGroup>
<PackageId>ricaun.Nuke</PackageId>
<Version>1.8.1-beta</Version>
<Version>1.8.1-beta.1</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit 8bfa0f1

Please sign in to comment.