From b35edb7da7fe001c2ad7bb55f066673445f05c82 Mon Sep 17 00:00:00 2001 From: Luiz Henrique Cassettari Date: Sat, 18 Nov 2023 19:39:31 -0300 Subject: [PATCH] Update `GetInformationalVersion` to remove `+` --- CHANGELOG.md | 2 ++ ricaun.Nuke/Extensions/AssemblyExtension.cs | 2 +- ricaun.Nuke/ricaun.Nuke.csproj | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db7b0ae..ca6b240 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Enable `SignBinary` with `PathTooLong` path. ### Updated - Create `PathTooLongUtils` to prevent `PathTooLongException` +### Fix +- Add `+` split with fix `GetInformationalVersion` with `+` in version. (Fix: #67) ## [1.7.1] / 2023-10-05 ### Features diff --git a/ricaun.Nuke/Extensions/AssemblyExtension.cs b/ricaun.Nuke/Extensions/AssemblyExtension.cs index c5354a5..7ec606a 100644 --- a/ricaun.Nuke/Extensions/AssemblyExtension.cs +++ b/ricaun.Nuke/Extensions/AssemblyExtension.cs @@ -78,7 +78,7 @@ public static bool IsVersionPreRelease(this Project project) /// /// /// - public static string GetInformationalVersion(this Project project) => project.GetFileVersionInfo()?.ProductVersion; + public static string GetInformationalVersion(this Project project) => project.GetFileVersionInfo()?.ProductVersion.Split('+').First(); /// /// GetCompany => CompanyName diff --git a/ricaun.Nuke/ricaun.Nuke.csproj b/ricaun.Nuke/ricaun.Nuke.csproj index c14f1ed..8041e6f 100644 --- a/ricaun.Nuke/ricaun.Nuke.csproj +++ b/ricaun.Nuke/ricaun.Nuke.csproj @@ -7,7 +7,7 @@ ricaun.Nuke - 1.7.2-alpha + 1.7.2-beta