Skip to content

Commit f7ccf51

Browse files
committed
Add version information from git
1 parent 08e0f17 commit f7ccf51

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/LinkDotNet.Blog.Web/Features/Home/Components/AccessControl.razor

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<li><h6 class="dropdown-header">Others</h6></li>
1717
<li><a class="dropdown-item" href="Sitemap">Sitemap</a></li>
1818
<li><hr class="dropdown-divider"></li>
19-
<li><a class="dropdown-item" target="_blank" href="https://github.com/linkdotnet/Blog/releases" rel="noreferrer">Version 4.3</a></li>
19+
<li><a class="dropdown-item" target="_blank" href="https://github.com/linkdotnet/Blog/releases" rel="noreferrer">@_version</a></li>
2020
</ul>
2121
</li>
2222
<li class="nav-item"><a class="nav-link" href="logout?redirectUri=@CurrentUri"><i class="lock"></i> Log out</a></li>
@@ -27,7 +27,8 @@
2727
</AuthorizeView>
2828

2929
@code {
30+
private const string _version = $"{ThisAssembly.Git.Tag} - {ThisAssembly.Git.Commit}";
31+
3032
[Parameter]
3133
public string CurrentUri { get; set; } = string.Empty;
32-
3334
}

src/LinkDotNet.Blog.Web/LinkDotNet.Blog.Web.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<ItemGroup>
88
<PackageReference Include="Blazored.Toast" Version="4.0.0" />
99
<PackageReference Include="BuildBundlerMinifier" Version="3.2.449" />
10+
<PackageReference Include="GitInfo" Version="2.3.0" />
1011
<PackageReference Include="Markdig" Version="0.30.4" />
1112
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="7.0.2" />
1213
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.2" />

0 commit comments

Comments
 (0)