Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions src/NRedisStack/Auxiliary.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Xml.Linq;
using NRedisStack.Core;
using NRedisStack.RedisStackCommands;
using StackExchange.Redis;
Expand Down Expand Up @@ -132,23 +131,8 @@ public async static Task<List<RedisResult>> ExecuteBroadcastAsync(this IDatabase

public static string GetNRedisStackVersion()
{
XDocument csprojDocument = GetCsprojDocument();

// Find the Version element and get its value.
var versionElement = csprojDocument.Root!
.Descendants("Version")
.FirstOrDefault();

return versionElement!.Value;
}

private static XDocument GetCsprojDocument()
{
string csprojFilePath = Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..", "..", "..", "src", "NRedisStack", "NRedisStack.csproj");

// Load the .csproj file.
var csprojDocument = XDocument.Load(csprojFilePath);
return csprojDocument;
Version version = typeof(Auxiliary).Assembly.GetName().Version!;
return $"{version.Major}.{version.Minor}.{version.Build}";
}
}
}
6 changes: 3 additions & 3 deletions src/NRedisStack/NRedisStack.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<Owners>Redis OSS</Owners>
<Description>.Net Client for Redis Stack</Description>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Version>0.10.0</Version>
<ReleaseVersion>0.10.0</ReleaseVersion>
<PackageVersion>0.10.0</PackageVersion>
<Version>0.10.1</Version>
<ReleaseVersion>0.10.1</ReleaseVersion>
<PackageVersion>0.10.1</PackageVersion>
</PropertyGroup>

<ItemGroup>
Expand Down