Versioning

This commit is contained in:
2022-04-17 20:36:28 +01:00
parent 328f6f166a
commit 5c1a49811a
15 changed files with 112 additions and 97 deletions

View File

@ -5,6 +5,8 @@ using isnd.Data;
using System.Linq;
using isnd.ViewModels;
using Unleash;
using System.Reflection;
namespace isnd.Controllers
{
@ -23,6 +25,7 @@ namespace isnd.Controllers
public IActionResult Index()
{
return View(new HomeIndexViewModel{
PkgCount = _dbContext.Packages.Count(),
UnleashClient = _unleashĈlient
@ -39,6 +42,11 @@ namespace isnd.Controllers
public IActionResult Contact()
{
ViewData["Message"] = "Your contact page.";
var ass = typeof(isn.Abstract.Resource).GetType().Assembly;
var attrs = ass.GetCustomAttributes(true);
// ass.GetCustomAttributes(true);
System.Reflection.AssemblyFileVersionAttribute v = (AssemblyFileVersionAttribute)
GetType().Assembly.GetCustomAttribute(typeof(AssemblyFileVersionAttribute));
return View();
}
@ -56,3 +64,6 @@ namespace isnd.Controllers
}
}
}

View File

@ -0,0 +1,9 @@
namespace isnd.Helpers
{
public static class SiteHelpers
{
public static string SemVer {
get => GitVersionInformation.SemVer;
}
}
}

View File

@ -40,8 +40,7 @@
</div>
<footer class="border-top footer text-muted">
<div class="container">
&copy; 2021 - isn - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
&copy; 2021 - isn <span>@SiteHelpers.SemVer</span>- <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
</div>
</footer>
<!-- <script src="/lib/jquery/dist/jquery.slim.min.js" ></script>

View File

@ -1,3 +1,4 @@
@using isnd.Data
@using isnd.ViewModels
@using isnd.Helpers
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

View File

@ -1,42 +1,42 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<UserSecretsId>85fd766d-5d23-4476-aed1-463b2942e86a</UserSecretsId>
<PackageVersion>1.0.1</PackageVersion>
<Version>0.1.0</Version>
<IsPackable>true</IsPackable>
<PackageLicenseExpression>WTFPL</PackageLicenseExpression>
<NoWarn>NETSDK1138</NoWarn>
<AssemblyVersion>0.1.0.0</AssemblyVersion>
<FileVersion>0.1.0.0</FileVersion>
<InformationalVersion>0.1.0+171.Branch.main.Sha.328f6f166a68b3e44ada08e9a13dd12570238679</InformationalVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.All" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="NuGet.Packaging.Core" Version="5.9.0"/>
<PackageReference Include="NuGet.Packaging.Core" Version="5.9.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.1" />
<PackageReference Include="MailKit" Version="2.11.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.1.1" IncludeAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.1" IncludeAssets="All" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.1" IncludeAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.1" />
<PackageReference Include="unleash.client" Version="1.6.1" />
<PackageReference Include="GitVersion.MsBuild" Version="5.6.10*">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../isn.abst/isn.abst.csproj" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.1" />
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.1.0-preview1-final" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\LICENSE" Pack="true" PackagePath="LICENSE"/>
<None Include="..\..\LICENSE" Pack="true" PackagePath="LICENSE" />
</ItemGroup>
</Project>
</Project>