From d1fdd1ce12f52c272b5c791a673e458c70916ab1 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Tue, 21 Feb 2023 16:04:51 +0100 Subject: [PATCH] Determine client build version automatically from git tag --- Pal.Client/Pal.Client.csproj | 15 +++++++++++++-- Pal.Client/Properties/AssemblyInfo.cs | 8 ++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 Pal.Client/Properties/AssemblyInfo.cs diff --git a/Pal.Client/Pal.Client.csproj b/Pal.Client/Pal.Client.csproj index 86feeac..990d0aa 100644 --- a/Pal.Client/Pal.Client.csproj +++ b/Pal.Client/Pal.Client.csproj @@ -3,7 +3,6 @@ net7.0-windows 11.0 - 2.16 enable @@ -14,6 +13,10 @@ true false true + false + false + false + false @@ -38,6 +41,7 @@ + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -96,7 +100,14 @@ Localization.resx - + + + + $(GitSemVerMajor).$(GitSemVerMinor) + $(Version) + + + diff --git a/Pal.Client/Properties/AssemblyInfo.cs b/Pal.Client/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4b66f84 --- /dev/null +++ b/Pal.Client/Properties/AssemblyInfo.cs @@ -0,0 +1,8 @@ +using System.Reflection; + +[assembly: AssemblyVersion(ThisAssembly.Git.SemVer.Major + "." + ThisAssembly.Git.SemVer.Minor)] +[assembly: AssemblyFileVersion(ThisAssembly.Git.SemVer.Major + "." + ThisAssembly.Git.SemVer.Minor)] +[assembly: AssemblyInformationalVersion( + ThisAssembly.Git.SemVer.Major + "." + + ThisAssembly.Git.SemVer.Minor + "+" + + ThisAssembly.Git.Commit)]