From e75686662c9f3a532a057c53e8844908c36fe160 Mon Sep 17 00:00:00 2001 From: Marcin Badurowicz Date: Tue, 19 Nov 2024 19:33:22 +0100 Subject: [PATCH 1/3] fix: output version info to text file --- .gitignore | 3 ++- Server/Fracture.Server.csproj | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0df008a..ad56366 100644 --- a/.gitignore +++ b/.gitignore @@ -410,4 +410,5 @@ FodyWeavers.xsd /Server/fracture.d* # AssemblyInfo.cs (it's autogenerated) -/Server/AssemblyInfo.cs \ No newline at end of file +/Server/AssemblyInfo.cs +version.txt \ No newline at end of file diff --git a/Server/Fracture.Server.csproj b/Server/Fracture.Server.csproj index 5201e62..7d381cd 100644 --- a/Server/Fracture.Server.csproj +++ b/Server/Fracture.Server.csproj @@ -33,6 +33,6 @@ - + \ No newline at end of file From 87a0a1e9ca490704cedf0ea36c3c7b6c3f6a821d Mon Sep 17 00:00:00 2001 From: Marcin Badurowicz Date: Tue, 19 Nov 2024 19:38:12 +0100 Subject: [PATCH 2/3] fix: showing version in UI --- Server/Components/Pages/GamePage.razor | 2 +- Server/Modules/Shared/VersionInfoProvider.cs | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Server/Components/Pages/GamePage.razor b/Server/Components/Pages/GamePage.razor index ae11af0..6c52d06 100644 --- a/Server/Components/Pages/GamePage.razor +++ b/Server/Components/Pages/GamePage.razor @@ -61,7 +61,7 @@
- Fracture @VersionInfoProvider.ShortVersion
+ Fracture @VersionInfoProvider.InformationalVersion
tutaj log mojej gry
diff --git a/Server/Modules/Shared/VersionInfoProvider.cs b/Server/Modules/Shared/VersionInfoProvider.cs index c3682a1..9e2c5e6 100644 --- a/Server/Modules/Shared/VersionInfoProvider.cs +++ b/Server/Modules/Shared/VersionInfoProvider.cs @@ -6,13 +6,9 @@ class VersionInfoProvider { public VersionInfoProvider() { - InformationalVersion = - Assembly - .GetEntryAssembly() - ?.GetCustomAttribute() - ?.InformationalVersion ?? string.Empty; - - ShortVersion = InformationalVersion.Substring(0, InformationalVersion.IndexOf(".Branch")); + var lines = File.ReadAllLines("version.txt"); + ShortVersion = lines[0]; + InformationalVersion = $"{lines[0]}-{lines[1]}"; } public string InformationalVersion { get; init; } From ca288b7ab80052ab4d1349e732a65a139c727e05 Mon Sep 17 00:00:00 2001 From: Marcin Badurowicz Date: Tue, 19 Nov 2024 19:40:39 +0100 Subject: [PATCH 3/3] chore: remove dotnet-gitversion --- .config/dotnet-tools.json | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 2719c34..9e52e96 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -15,13 +15,6 @@ "dotnet-csharpier" ], "rollForward": false - }, - "gitversion.tool": { - "version": "6.0.5", - "commands": [ - "dotnet-gitversion" - ], - "rollForward": false } } } \ No newline at end of file